You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use passport for this. We will use the 2FA code to establish a session, then the cookie will be sent on all future requests to authenticate until it expires.
Here are the steps:
Use the passport-session library
Use the localStrategy as shown here http://www.passportjs.org/docs/configure/
Make sure the username is _id and the password is the 2FA code. You'll have to make sure the request is properly formatted for passport to automatically grab those fields.
Inside the localStrategy, do the 2FA code check
On the same page, you'll see serializeUser and deserializeUser. You probably need to implement those as well with ``_id`
The text was updated successfully, but these errors were encountered:
Use passport for this. We will use the 2FA code to establish a session, then the cookie will be sent on all future requests to authenticate until it expires.
Here are the steps:
passport-session
libraryMake sure the
username
is_id
and thepassword
is the 2FA code. You'll have to make sure the request is properly formatted for passport to automatically grab those fields.On the same page, you'll see
serializeUser
anddeserializeUser
. You probably need to implement those as well with ``_id`The text was updated successfully, but these errors were encountered: