I want to Enroll an already logged in user to MFA using Universal Login without them having to login again. In my app, I want users to be able to go to their profile page and select “enroll mfa” if they don’t have it yet.
Is this possible?
Here’s the flow I’ve tried so far:
- When “enroll mfa” button is clicked, “enableMfa=1” gets added to user_metadata
- I then do a silent auth by redirecting to /authorize with prompt=none
- A post-login action reads the user metadata, if it sees ‘enableMfa’ it would do api.authentication.challengeWith({type: ‘otp’});
I did silent auth in step 2 in the hopes that Universal Login would detect existing session and that it would just show the MFA enrollment prompt — unfortunately that was not the case.