The URL to return to after a successful login redirect callback.
Application state saved before the user was redirected for a login.
Property | Type | Description |
---|---|---|
|
|
The URL to return to after a successful login redirect callback. |
|
|
extends AuthState
Property | Type | Description |
---|---|---|
|
|
Redirects the browser to the change password page on the authorization server. |
|
|
Redirects the browser to the registration page on the authorization server |
|
|
Attempts check the user’s session by silently retrieving an access token. If the user is no longer authenticated, this will clear the authentication state. |
|
|
The current client ID. |
|
|
Find the user operations for the scopes for the user. This is useful for the client to know what operations the user is permitted to use for different scopes, e.g., can they manage account users? The object this returns will have a list of operations. Each operation will be a security
scope mapped to the permitted operations such as |
|
|
Retrieve an access token for the user using the silent authentication flow. |
|
|
Retrieve the [User] information for the current user. |
|
|
Redirects the user to the authorization server’s login page as part of the Authorization Code Grant with PCKE flow. |
|
|
Logs out the current user with a redirect URI back to the application. |
|
|
Logs in the user with the given credentials rather than redirecting to the Auth Service hosted form. Requires additional configuration on the backend to enable:
|
|
|
Registers the user with the given form data rather than redirecting to the Auth Service hosted form. Requires additional configuration on the backend to enable:
|
|
|
Changes the user’s password with the given one rather than redirecting to the Auth Service hosted form. Requires additional configuration on the backend to enable:
|
|
|
Resets the user’s password with the given one rather than redirecting to the Auth Service hosted form. Requires additional configuration on the backend to enable:
|
|
|
Submits a request to get a reset-password link in an email rather than redirecting to the Auth Service hosted form. Requires additional configuration on the backend to enable:
|
|
|
Updates the account ID if the user has selected to operate in an Account context. This will also cause a new access token to be fetched. |
|
|
Reads the roles available to the account (e.g., business account) users. |
Props for the AuthProvider
.
Property | Type | Description |
---|---|---|
|
|
The account ID selected for the user. |
|
|
The base URL of the authorization server. |
|
|
The children components of this provider. |
|
|
The client ID. |
|
|
Whether or not to send credentials for cross-site XHR requests. Defaults to
|
|
|
A customer initializer function to create a new |
|
|
|
|
|
The default redirect URI used for login redirect flow. Defaults to
|
|
|
The default scope used for authorization requests. Defaults to |
|
|
The default redirect URI used for iframe, silent-authentication flow. This is only used if
|
|
|
Whether or not to skip the redirect callback. This may be necessary in certain scenarios where you are mixing authentication providers. |
|
|
Whether to use a refresh token rotation instead of iframe silent auth. The default is <a href="https://developer.broadleafcommerce.com/services/authentication-services/authorization#refresh_token_rotation_grant_type_em_since_1_4_0_em"> See Refresh Token (Rotation) Grant Type docs</a>. |
Contains information about the state of authentication such as whether the user is authenticated, the user’s details, and if there was an error during authentication.
Here’s the flow for some key properties:
Authentication check has not been performed:
{
"isAuthenticated": false,
"didAuthenticationCheck": false,
"isLoading": false
}
Authentication check is in process
{
"isAuthenticated": false,
"didAuthenticationCheck": false,
"isLoading": true
}
Authentication check has occurred and user is authenticated
{
"isAuthenticated": true,
"didAuthenticationCheck": true,
"isLoading": false
}
Authentication check has occurred and user is not authenticated
{
"isAuthenticated": false,
"didAuthenticationCheck": true,
"isLoading": false
}
Property | Type | Description |
---|---|---|
|
|
An error that occurred during authentication. |
|
|
Whether the user is to be authenticated. Will be false if the authentication request has not been received or is pending. |
|
|
Whether authentication has been attempted. Will be false until the check actually takes place and is completed. |
|
|
Whether the authentication check is ongoing. Will be false before authentication has been attempted. |
|
|
The expiry for the user’s session including the inactivity |
|
|
Claims for an issued access token. |