Two-Factor Auth

KS
Last updated 6 months ago

Require two-factor authentication when your users login

You may require two-factor authentication using our Authy Integration. In order to perform two-factor authentication, your authentication server must respond with a 2xx to the login request and a JSON payload of the following format

{
authyUserId: 'AUTHY_USER_ID',
...
}

You may, optionally, nest the user under a user key

{
user: {
authyUserId: 'AUTHY_USER_ID',
...
}
}

If your authentication server does not deliver a payload in the following format, you may use the didReceiveData callback to modify the payload. If Mason doesn't find an authyUserId key in the top-level, or in a user object, two-factor authentication will be skipped.

Server-side Validation

See Authy Server-side Validation.‚Äč