api.access
Modify the access of the user that is logging in, such as rejecting the login attempt.
void
Mark the current login attempt as denied. This prevents the end-user from completing the login flow. This will NOT cancel other user-related side-effects (such as metadata changes) requested by this Action.Parameters
Example
api.accessToken
Request changes to the access token being issued.
void
Set a custom claim on the access token issued upon completion of the login flow.Parameters
Example
void
Add a scope to the access token issued upon completion of the login flow.Parameters
Example
void
Remove a scope from the access token issued upon completion of the login flow.Parameters
Example
api.idToken
Request changes to the ID token being issued.
void
Set a custom claim on the ID token issued upon completion of the login flow.Parameters
Example
api.authentication
Request changes to the authentication state of the current user’s session.
void
Request a challenge for MFA using the supplied factor. Subsequent Actions will not run until the challenge is fulfilled.Parameters
Challenge with a specific factor
Challenge with additional factors
void
Request a challenge for MFA using any of the supplied factors, showing a factor selection screen.Parameters
Example
void
Request an enrollment for MFA using the supplied factor.Parameters
Example
void
Indicate that a custom authentication method has been completed. Only available from within Parameters
onContinuePostLogin after a redirect.Example
void
Change the primary user for the login transaction. Use in account-linking scenarios where the initiating identity is now a secondary identity of an existing user.IMPORTANT: Insecurely linking accounts can allow malicious actors to access legitimate user accounts. The identity used to authenticate must be among the secondary identities of the referenced user.Parameters
Example
api.multifactor
Set or remove the requirement for MFA on the login attempt.
void
Enable MFA for this login flow. Users must complete the configured MFA challenge before completing login.Parameters
Example
api.redirect
Configure and initiate external redirects.
string
Create a signed session token for use as a query string parameter in a redirect. The target endpoint verifies authenticity using a shared secret.Parameters
Example
void
Trigger a browser redirect to the target URL immediately after this action completes.Parameters
Example
object
Retrieve and verify data encoded in a JWT passed to the Parameters
/continue endpoint.Example
api.user
Make changes to the metadata of the user that is logging in.
void
Set application-specific metadata for the user. This function works only with metadata in object format.Parameters
Example
void
Set general metadata for the user that is logging in. This function works only with metadata in object format.Parameters
Example
api.session
Request changes to the current user’s session.
void
[Enterprise] Revoke the current user session and mark the login attempt as denied.Parameters
Revoke the session while preserving refresh tokens
void
[Enterprise] Sets a new absolute expiration time for the current session.Parameters
Example
void
[Enterprise] Sets a key-value pair in the metadata object of the current session.Parameters
Example
api.refreshToken
Request changes to the current user’s refresh token.
void
[Enterprise] Revoke the current refresh token and deny the refresh token exchange.Parameters
Example
void
[Enterprise] Sets a key-value pair in the metadata object of the current refresh token.Parameters
Example
api.validation
Prevent user from logging in by signaling a validation error.
void
Throw a validation error to prevent login.Parameters
Example
api.prompt
Render a custom prompt screen.
void
Render a custom prompt during the login flow.Parameters
Example
api.samlResponse
Configure custom SAML response attributes.
void
Set attributes on the SAML assertion issued to the authenticated user.Parameters
Example
void
Set the audience of the SAML assertion. Default is the issuer on SAMLRequest.Parameters
Example
void
Set the encryption algorithm for the SAML assertion. Default is Parameters
aes256-cbc.Set the encryption algorithm to aes256-gcm (recommended)
api.groups
Get information about user group membership.
Promise<object>
Get the paginated list of groups the user belongs to.Parameters
Example
Promise<object>
Check if the user is a member of any of the specified groups.Parameters
Example
api.cache
Store and retrieve data that persists across executions.
void
Delete a cached record at the supplied key if it exists.Parameters
Example
object | undefined
Retrieve a cached record at the supplied key. If found, access the value via Parameters
record.value.Example
void
Store or update a string value in the cache at the specified key. Values are scoped to the Trigger and subject to the Actions Cache Limits. If no lifetime is specified, a default lifetime of 15 minutes will be used.Important: This cache is designed for short-lived, ephemeral data. Items may not be available in later transactions even if they are within their supplied lifetime.Parameters
Example