DEV Community

Discussion on: Predictable React authentication with the Context API

Collapse
 
samueldervis profile image
Samuel Dervis

Very good tutorial. How can you plug in MFA?

Collapse
 
jfranciscosousa profile image
Francisco Sousa

You can add a variable like needsMfa to the user returned in useAuth and use that to render the extra MFA step. I'd say it mostly depends on what the backend is using but you can add all that logic to useAuth relatively easy.

Just make sure your app renders the MFA form when the user is eligible for that.