Replies: 1 comment 1 reply
-
if your id is "regularSignIn"
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
So I saw the doc where it says you can use more than one. I want to use one where it takes email and password and another where it takes email, password, 2FA.
Now I saw that you have you give it an Id and a a name to each, that I understand. But how do I tell it which one to use? I made my custom login page, and I use the signIn of import { signIn } from "next-auth/react"; there. It works as I want it, I just want to add that if the user has 2FA then enter the 2FA value, if not then just signIn with the regular one.
So my question is how do I tell it that I want the one with 2FA and not the other one?
Additional information
I'm using Next,js 13 App Router
Example
Where do I tell it do use the other one?
const res = await signIn("credentials", { redirect: false, email: formValues.email, password: formValues.password, callbackUrl, });
Beta Was this translation helpful? Give feedback.
All reactions