- Prompt the user to authenticate their primary factor.
- Prompt the user to authenticate their secondary factor, leveraging the Stytch Session from Step 1 to create a new Session that contains both authentication factors.
- Enforce MFA by inspecting the
authentication_factorsarray on the Stytch Session object in your application’s authorization logic.
MFA factor combinations
You can customize which primary and secondary authentication methods you’d like to offer your users:
The primary and secondary factors that you choose should confirm your user’s identity in two different ways – for example, Email Magic Links and Email OTP are not a secure primary and secondary factor combination, because they both prove ownership of the same factor (an email address). Email Magic Links and TOTP are a secure combination, because they prove ownership of an email address and ownership of the TOTP authenticator app.
If a user has multiple factors set up, our frontend SDKs will require a secure combination of factors to be authenticated before allowing the user to take sensitive actions, like adding or removing auth factors. For additional information about this, see here.