Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Account Portal

4 sites Security covered Drupal 10–11
View on drupal.org

This module provides account portal functionality, allowing you to create a dedicated area within Drupal for managing user logins, registrations, and other account-related features for your OAuth applications. It integrates with consumers to handle requests from different applications and helps track the origin of users for a seamless experience.

This module provides the fundamental functionality to implement an "Account Portal", like how Google does it when you log in to a website with your Google account (accounts.google.com).

For what is this for?

When you want to build a "portal" to provide account functionality for your OAuth applications, like login, registration, etc.

The idea is to create a contained area in drupal where the user get's redirected when login in. This is mainly the /oauth/authorize endpoint from Simple OAuth. Depending in your setup, the user can then login or register, handle 2FA or even Passkeys.

You might also be interested in the Simple OAuth Account Picker module that let's the user pick the current account or previous accounts, just like Google does it.

Functionality

The following functionality is provided:

  • Deeply integrates with the consumers module to distinguish requests from different consumers.
  • Each request is expected to be prefixed with an account portal path and the consumer id. e.g. /account-portal/realm/_consumer-id_/user/login.
  • Configurable routes which will have the base-path prefixed when the URL to that route is generated.
  • Provides a utility to get the origin from where the user comes from.

Various utility functions are provided in AccountPortalUtility.

Most notably the AccountPortalUtility::getRedirectUri() method is used to get the redirect URL to where the user came from. The URL is either infered from the redirect_uri GET parameter, which is set when using the Authorization Code Grant or the Referer HTTP header.

Why not use the core routes?

One coud ask why not just use the core routes, like `/user/login`.
This indeed would work, but the problem is that in more complex flows,
like user registration, the user needs to go through multiple steps
(pages) before being redirected back to the external application.

If the user wants to abort the process and go back to the external
application, it would be very hard to get the information from where
the user came from.

Therefore by redirecting the user to an account portal route, the needed
information is always available.

This would also enable you to customize the account portal pages on a
per consumer basis. (e.g. show custom links, if the user comes from
a native mobile app, etc.)

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
Oct 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 6
Maintenance
Dormant

Release Timeline

Releases

Version Type Core Release date
1.0.2 Stable 10–11 Jan 17, 2025
1.0.1 Stable 10–11 Dec 18, 2024
1.0.0 Stable 10–11 Dec 12, 2024
1.0.0-beta2 Pre-release 10–11 Oct 3, 2024
1.0.0-beta1 Pre-release 10–11 Oct 3, 2024
1.x-dev Dev 10–11 Oct 3, 2024