How do I remember onContinuePostLogin success between login?

Hello,

I am trying to setup an additional requirement on login using Action Redirects. I see the documentation for “api.authentication.recordMethod” to prevent prompting again for the current login session but is there a way to do this across multiple login sessions? I want to create a custom MFA but I don’t want to force the user to answer my questions each time they login, instead I would like to detect if they are coming from a new device (browser/machine) that I have not seen before and only then require questions. Are there any properties on the event or api inputs that would allow me to know my user is coming from a new device?

Thanks,

Frank

Hi @frank.wisniewski,

Welcome back to the Auth0 Community and sorry for the late reply.

You can use the NewDevice property from the event.authentication object in a Post-Login Action to determine if the user is logging in from a new Device or not, then prompt the user for MFA or not.

You can check out the MFA Required Only if Logging in With New Device Knowledge Article that provides more details.

Hope this helps!
Thanks,
Remus

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.