Next.js Discord

Discord Forum

Credentials 2FA After login

Unanswered
Silver posted this in #help-forum
Open in Discord
SilverOP
Hello

i'm trying to figure out how to properly handle 2FA for my own database / API i have wrote, in NextAuth.js
so far i know you use the async authorize and try to compare the password with the hashed from the DB...

But now after that is sucessfull and the user has 2FA enabled i'd like to handle it in the frontend so the user can somehow also put the 2FA, however i have no idea where to begin because all the code examples show without 2FA or second step systems

2 Replies

Orinoco Crocodile
I don’t believe 2FA is currently supported with NextAuth
SilverOP
Hmm I guess I will write my own logic then, and implement things like Google myself