api.access
Modify the access of the user that is attempting to reset their password.
api.access.deny(reason)
Mark the current password reset attempt as denied. This will prevent the end-user from completing
the password reset flow. This will NOT cancel other user-related side-effects
requested by this Action. The password reset flow will immediately stop following the
completion of this action and no further Actions will be executed.
Parameters
api.authentication
Request changes to the authentication state of the current user’s session.
api.authentication.challengeWith(factor, options)
Request a challenge for multifactor authentication using the supplied factor and optional additional factors.
When a multifactor challenge is requested, subsequent Actions will not be run until that challenge has been
fulfilled by the user. A user will have satisfied the challenge in any of the following situations:
- They successfully complete the challenge for the default factor.
- They successfully complete the challenge for any of the optional factors described in
additionalFactors.
This method will result in a factor challenge screen being shown if the user has not already satisfied the requirements of the challenge. If
additionalFactors are supplied, the user will have the option to select another factor if they choose to.api.authentication.challengeWithAny(factors)
Request a challenge for multifactor authentication using any of the supplied factors (showing a factor selection
screen first).
When a multifactor challenge is requested, subsequent Actions will not be run until that challenge has been
fulfilled by the user. A user will have satisfied the challenge in any of the following situations:
- They successfully complete the challenge for any of the factors.
This method will result in the factor selector screen being shown if the user has not already satisfied the requirements of the challenge. If there is a preferred factor, the
api.authentication.challengeWith() method is preferred. The factor selector screen will not be shown if only one factor is passed in or is valid.api.redirect
Configure and initiate external redirects.
api.redirect.encodeToken(options)
Create a session token suitable for using as a query string parameter redirect target (via sendUserTo)
that contains data whose authenticity must be provable by the target endpoint. The target endpoint
can verify the authenticity and integrity of the data by checking the JWT’s signature
using a shared secret.
The shared secret should be stored as a secret of the Action and will be readable at
event.secrets['<secret_name>'].
Parameters
api.redirect.sendUserTo(url, options)
Cause the password reset pipeline to trigger a browser redirect to the target url immediately after
this action completes. The createUrl helper method is provided to simplify encoding
data as a query parameter in the target url such that the data’s authenticity and
integrity can be verified by the target endpoint.
Parameters
api.redirect.validateToken(options)
Retrieve the data encoded in a JWT token passed to the /continue endpoint while verifying
the authenticity and integrity of that data.
Parameters
api.cache
Make changes to the cache.
api.cache.delete(key)
Delete a record describing a cached value at the supplied
key if it exists.
Parameters
api.cache.get(key)
Retrieve a record describing a cached value at the supplied key,
if it exists. If a record is found, the cached value can be found
at the value property of the returned object.
Parameters
api.cache.set(key, value, options)
Store or update a string value in the cache at the specified key.
Values stored in this cache are scoped to the Trigger in which they
are set. They are subject to the Actions Cache Limits.
Values stored in this way will have lifetimes of up to the specified
ttl or expires_at values. If no lifetime is specified, a default of
lifetime of 15 minutes will be used. Lifetimes may not exceed the maximum
duration listed at Actions Cache Limits.
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 their lifetime.
Parameters