This is login-time MFA: a second factor on every sign-in. It’s distinct from Para’s recovery 2FA (
useSetup2fa / useVerify2fa and the Developer Portal’s Recovery Two-Factor Authentication setting), which gates account recovery only.Turn it on
Set Login Two-Factor Authentication on your project’s Security page in the Developer Portal. See Developer Portal Security Settings.
When it’s on, choose the methods users can enroll: an authenticator app (any TOTP app), a passkey, or a password. A second factor a user has already enrolled is always required for that user, whatever the setting says.
If an account keeps its wallet on the user’s device behind a passkey, that passkey is its second factor: the user doesn’t set up an authenticator app and isn’t asked for anything extra at sign-in. Accounts that keep their wallet on the device behind a password or PIN set up an authenticator app like other users.
With the Para Modal
No code changes. When a sign-in needs a second factor, the Para-hosted step walks the user through it: setting up a factor the first time (including showing backup codes once), or verifying one they already have. The modal then finishes connecting the wallet as usual.With a Custom UI
Para runs the second-factor step on its own pages: both setting up a second factor and verifying one. A custom UI doesn’t build 2FA screens, but its sign-in has to reach a Para-hosted page:- The sign-in runs on a Para-hosted page (for example the OAuth popup, or a hosted login or verification URL you open). The second-factor step runs on that same page, and your UI needs no changes.
- A React Native app collects the email or phone code in its own UI without opting in to the updated authentication flow. An account that owes a second factor can’t finish signing in this way. See React Native Login 2FA.
Backup codes
When a user sets up an authenticator app, Para shows them a set of one-time backup codes once. A backup code is accepted anywhere an authenticator code is, and each one works once. Para stores only hashes of them.Wrong codes and lockout
A wrong code shows how many attempts remain, so the user can try again. After too many wrong codes the sign-in is locked out, and the user must sign in again, which resets the count.Security
- The authenticator secret is generated and stored encrypted by Para. Setup only ever happens on Para-hosted pages, so your app never handles it.
- Backup codes are single-use and stored as hashes.
- The second factor is enforced on Para’s backend: until it’s satisfied, the session can’t reach the user’s wallet. Your UI can’t skip it.
Troubleshooting
The login never asks for a second factor
The login never asks for a second factor
Check the Login Two-Factor Authentication setting on the Developer Portal’s Security page. In Optional mode only users who have enrolled a factor are asked. In a custom UI, make sure the sign-in runs on a Para-hosted page (see With a Custom UI).
A correct code doesn't advance the login
A correct code doesn't advance the login
The SDK picks the login back up on its own once the second factor is accepted, so don’t start authentication again. If you keep a sign-in popup open, leave it open until the wallet connects.
Codes are always rejected
Codes are always rejected
Authenticator codes are time-based, so make sure the device clock is accurate. A user who lost their authenticator can use a backup code.