Skip to content

Latest commit

 

History

History
53 lines (33 loc) · 2.62 KB

forgot-username.md

File metadata and controls

53 lines (33 loc) · 2.62 KB

Forgot Username Flow

This flow is used in setups where a user logs in with a username different to their email address.
The user must then enter their email address and will receive their username in an email.

Prerequisites

The plugin must first be configured with an email provider in its settings:

Email Provider

Initial Screen

The entry point to the forgot username flow is shown below.
The page is invoked via a GET request to a URL such as /authn/authentication/forgot-account-id:

Initial Screen

Input Validation

The input is only accepted if the value entered is a valid email regular expression.
Non-existing and existing values are both accepted, as a best security practice.

After Submission

The following screen is rendered:

Submitted

Email Received

An email will then be received that provides the username:

Email Received

Code Behavior

The Request Handler provides the plugin logic for this flow.
This class is injected with the following SDK objects, which implement its main behavior:

SDK Object Usage
AccountManager Used to find the account for the username or email entered
UserPreferenceManager Used to default the username to the previously saved value
EmailSender Used to send the forgot username email

The following resources can be customized as required: