MFA with Custom Login Page

I have custom login page (Branding > Universal Login > Advanced Options > Login > Custom Login Page) . How can I trigger a users to continue to MFA after passing the username/password check (webAuth.login)?

To trigger users to continue to MFA after passing the username/password check on your custom login page, you can follow these steps:

  1. Authenticate the user with username and password: Use the webAuth.login method to authenticate the user with their username and password. This will verify their credentials and allow them to proceed to the next step.

  2. Check MFA enrollment: After successful username/password authentication, you need to check if the user has MFA enabled or enrolled. You can make a request to the /api/v2/users/{user_id}/enrollments endpoint to retrieve the user’s MFA enrollment details.

  3. Redirect to MFA if enrolled: If the user has MFA enabled or enrolled, you can redirect them to the MFA verification page. You can either use the webAuth.passwordlessStart method with the appropriate parameters or redirect the user to a specific URL that triggers the MFA flow.

  4. Handle MFA verification: On the MFA verification page, you can implement the necessary logic to handle the MFA verification process. This can include methods such as SMS OTP, email verification, or other supported MFA methods.

By following these steps, you can trigger users to continue to MFA after passing the username/password check on your custom login page. This allows for a seamless authentication and MFA verification process for your users.