ImsAuthProps Properties
The ImsAuthProps
properties define the authentication information and flow that the Content Fragment Selector uses to obtain an imsToken
. By setting these properties, you can control how the authentication flow should behave and register listeners for various authentication events.
Property Name | Description |
---|---|
imsClientId | A string value representing the IMS client ID used for authentication purposes. This value is provided by Adobe and is specific to your Adobe AEM CS organization. |
imsScope | Describes the scopes used in authentication. The scopes determine the level of access that the application has to your organization resources. Multiple scopes can be separated by commas. |
redirectUrl | Represents the URL where the user is redirected after authentication. This value is typically set to the current URL of the application. If a redirectUrl is not supplied, ImsAuthService will use the redirectUrl used to register the imsClientId |
modalMode | A boolean indicating whether the authentication flow should be displayed in a modal (pop-up) or not. If set to true , the authentication flow is displayed in a pop-up. If set to false , the authentication flow is displayed in a full page reload.Note: for better UX, you can dynamically control this value if the user has browser pop-up disabled. |
onImsServiceInitialized | A callback function that is called when the Adobe IMS authentication service is initialized. This function takes one parameter, service , which is an object representing the Adobe IMS service. See ImsAuthService for more details. |
onAccessTokenReceived | A callback function that is called when an imsToken is received from the Adobe IMS authentication service. This function takes one parameter, imsToken , which is a string representing the access token. |
onAccessTokenExpired | A callback function that is called when an access token has expired. This function is typically used to trigger a new authentication flow to obtain a new access token. |
onErrorReceived | A callback function that is called when an error occurs during authentication. This function takes two parameters: the error type and error message. The error type is a string representing the type of error and the error message is a string representing the error message. |