Step-up Authentication
Step-up authentication is a security mechanism that allows you to add additional authentication requirements for sensitive operations in your application. It works by requiring users to re-authenticate when accessing high-risk features, even if they're already logged in.
How Step-up Authentication Works
When a user needs to perform a sensitive operation (like making a purchase or accessing personal data), you can trigger step-up authentication. This requires the user to verify their identity again, typically using a stronger authentication method than their initial login.
After successful step-up authentication, the user's session token is updated with a su
(step-up) claim set to true
. This allows your application to verify that the user has completed the additional authentication step. This stepped-up token will be valid for the duration of the
Step Up Token Timeout defined in Project Settings.
Use Cases
Step-up authentication is particularly useful for:
- Financial transactions (e.g., making purchases, transferring money)
- Accessing sensitive personal information
- Administrative operations
- Changing account settings
- Any high-risk operation that requires additional verification
Implementation Options
You can implement step-up authentication using our Flows, Client SDKs, or Backend SDKs.
Option 1: Using Descope Flows
Descope provides a pre-built step-up
flow that you can easily integrate into your application. This flow:
- Loads the user from their refresh token
- Marks the flow as a step-up authentication
- Presents authentication options (magic link, passkeys, social login)
- Updates the session token upon successful authentication
You can integrate a step-up flow in your application in the same way you would integrate a regular authentication flow. After the step-up flow succeeds,
the user's JWT will be updated with the su
claim.
Option 2: Using Client SDKs
To perform step-up authentication using our Client SDKs, you use the same "Sign In" or "Sign Up Or In" functions as you would for regular authentication. You just have to specify that you are performing step-up using the Login Options parameter.
The below example implements step-up authentication via OTP Sign-In after the user has already authenticated using another authentication method.
In loginOptions
, stepup
is set to true, indicating that this is a step-up authentication action. On success of the sign in function, the user's JWT will include the su
claim.
Option 3: Using Backend SDKs
To perform step-up authentication using our Backend SDKs, you use the same "Sign In" or "Sign Up Or In" functions as you would for regular authentication. You just have to specify that you are performing step-up using the Login Options parameter.
The below example implements step-up authentication via OTP Sign In after the user has already authenticated using another authentication method.
In loginOptions
, stepup
is set to true, indicating that this is a step-up authentication action. On success of the sign in function, the user's JWT will include the su
claim.
Step-Up Validation
To validate that the session was successfully stepped up, you can utilize the Backend SDKs to validate the session and check that the su
claim is true
.
Resources
The B2C Retail Sample App, Tee-Hee Tees demonstrates a practical implementation of step-up authentication. Users can browse products and add items to their cart with basic authentication. When the user proceeds to checkout, step-up authentication is required.
Check out our learning center article for more examples, use cases, and guidelines on implementing step-up authentication.
Adaptive MFA
Learn how to implement adaptive MFA within your Descope flows. This guide has examples of trusted device, IP reputation, and impossible traveler adaptive MFA.
Fingerprinting
This guide explains the fingerprinting capabilities available in Descope, including device fingerprinting, risk-based authentication, and bot detection.