Register Temporary Password

Generates a temporary password for a user

Description

This step generates a temporary password that can be used to authenticate using the Password Authentication step. For example, a temporary password can be generated for a user for their first login or if they forgot their password. Once the temporary password serves its purpose, a new password can be set using the Register Password step.

The username may be provided implicitly by the journey if the user is already authenticated; otherwise, a user identifier must be specified in the step configuration. For example, if a user forgot their password, a form can be used to collect the username (see Get Information From Client).

By default, the temporary password will expire after 72 hours. However, the expiration time can be configured in the Password settings for the application.

Once triggered, the step generates a temporary password and stores it in the output variable configured in the step. The steps that follow can be used to send the password to the user and authenticate it. If this step fails, the journey proceeds to a failure branch (if specified); otherwise, the journey is aborted and an error is sent to the client.

Configuration

Field Description
User Auth State Indicates if the user has authenticated in this journey. If the user is authenticated (default), the user context is provided implicitly by the journey. If not, a user identifier must be configured.
User Identifier User identifier, specified as an expression. Only configured if the journey doesn't authenticate the user before invoking this step.
Output Variable Name of the variable that stores the step result
Error Output Variable Name of the variable that stores any errors returned by step
Failure Behavior Determines the behavior in case of failure, which either aborts the journey or proceeds to a failure branch of the control flow (default).

Example

Consider a password reset flow for a user that forgets their password. Suppose a form collects the user's email which is also their username (using the Get Information From Client step). This step obtains the user identifier from the form output (resetData.email in our case) and stores the generated password in a variable named temporary_password.