Introduction
The "Remember Me" functionality can reduce friction in the sign-in flow, by remembering the user that previously signed in. Instead of the user needing to remember which authentication method they used for your application, you can now adjust your flows to suggest which method they used most recently.
To implement this in your flow, simply add a condition at the beginning, checking iflastAuth.loginId
is not empty:![Descope remember me guide configuring conditional based on existing user.](/static/image1-2bb6aa8656ab47fc2cf2f3cb74eda692.png)
If
lastAuth.loginId
is not empty - add a screen that will show the user the remembered name and have a button to sign in:![Descope remember me guide configuring welcome screen.](/static/image2-07cf45ea4627c6b3f0ce585f37e8190f.png)
For the "Sign In" button, create a condition for the remembered authentication method using
lastAuth.authMethod
:![Descope remember me guide configuring conditional based on existing user and auth methods.](/static/image3-1d43d17dec926c921f7b832614656e7f.png)
Then, connect all the conditions to the relevant authentication methods in the Flow Editor.
This is how it will look like:
![Descope remember me guide configuring conditional location within flow.](/static/image4-8b7255d8cf1ddcc54ceac7f94e7cfc33.png)
Last authentication - name
The keylastAuth.name
can be used inside a flow condition to display an informative message to the end user,
relatively, when he returns to your log-in page.![Descope remember me guide lastAuth.name condition](/static/image5-0a64c5a56ce5c5fcface53ae10cfac99.png)
![Descope remember me guide lastAuth.name example](/static/image6-d8a611867e943d29e338f7f33f2d03fe.png)
This key has a failover mechanism in case one of the user's fields that populate it contains no data.
1. Display Name
2. Login ID
3. Email
4. Phone