Aller au contenu principal

MFA, passkeys, sessions and passwordless login

These features protect users of your application. Enrollment, recovery codes, sessions and anomalies use the application user's Bearer token. Login completion uses the one-time MFA ticket or email code returned by the preceding step. Neither flow requires the developer's dashboard session. See compatibility notes if an older deployment returns an unexpected 401.

This page describes application features that a developer must integrate. Changing your own dashboard MFA settings does not add these flows to your app. If you are testing SyAuth without an app, finish the basic hosted-login test first; the callback receiver does not implement MFA enrollment or passkeys.

For scoped application tokens, allow and request read for GET operations and write for POST/DELETE operations. For example, an app integrating these APIs can allow openid profile email read write on its client and request those scopes during authorization. A token without the required scope returns 403; a developer token is not a substitute.

FeatureWhat the user should experienceWhat must be completed
Authenticator MFAAn extra current-code prompt during sign-inEnrollment, confirmation, then a later login challenge completed by the app
PasskeyA browser/device prompt to register or use a credentialThe app's begin/browser-prompt/finish sequence on a supported origin
Passwordless emailA sign-in code arrives in the user's mailboxRequest, delivery, code submission and any required MFA challenge
Session managementA view of sign-ins with a way to revoke a selected sessionAuthenticated session listing and the intended revoke operation

Authenticator apps and recovery codes​

An authenticated user starts TOTP enrollment, adds the returned secret/otpauth_uri to their authenticator, then confirms device_id with a current code. Enrollment is incomplete until confirmation succeeds.

A subsequent login can return mfa_required, mfa_ticket, and available methods. Submit the ticket and current code to complete sign-in. Verification consumes the ticket even if the code is wrong; restart primary login after a failed attempt. A recovery code can be supplied in the code field; it is single-use. Regenerating recovery codes invalidates the previous set. Generating recovery codes alone does not activate a primary MFA factor.

Passkeys​

Registration follows begin → browser navigator.credentials.create() → finish. Sign-in follows primary authentication/ticket → begin → navigator.credentials.get() → finish with the same ticket. Use the WebAuthn payload specified by the API and Base64URL-encode binary credential fields.

Browser origin, relying-party ID and challenge must match the enabled deployment. Use HTTPS and a supported browser. An expired or already-used challenge requires a fresh attempt. Confirm support for your intended application origin before rollout.

Passwordless email​

First create a magic_link email template containing {{ magic_code }} in the application's workspace. Request a sign-in code for an existing user with email and public client context, receive it by email, and consume it once with the same context. Generic request responses do not confirm whether an account exists or whether delivery succeeded. A user with MFA may still need to complete a challenge before receiving tokens.

Sessions​

Application session APIs list recent sessions, revoke one, or revoke other sessions while preserving the current one when it can be identified. They are separate from dashboard sessions and OAuth token revocation. Do not assume one revoke operation ends every credential type.

See MFA/passkey/session requests, email sign-in and security anomalies.

For each feature, check the complete experience with a test user before treating setup as finished. An enrollment response or a browser prompt alone does not complete sign-in. For an unexpected 401, check token expiry/revocation or restart the login challenge. If the correct credential is still rejected, collect the exact failing request/status and ask support to confirm the backend release. Keep developer credentials out of application-user login requests.