How to Manage "To confirm your identity, sign in with the same account you used originally." #10631
Replies: 2 comments 1 reply
-
Finally i do this export const {
handlers,
signIn,
signOut,
auth: baseAuth,
} = NextAuth({
adapter: PrismaAdapter(prisma),
providers: [
GitHub({ allowDangerousEmailAccountLinking: true }),
Google({ allowDangerousEmailAccountLinking: true }),
], |
Beta Was this translation helpful? Give feedback.
1 reply
-
great answer ,just solve this problem |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello.
I have 2 providers (gihub and google). I understant that it's not secure to accept 2 provider with same email.
I would like to manage this error and display a page for explain users to login with the good provider.
/api/auth/signin?error=OAuthAccountNotLinked
I'm with nextjs 14 and auth.js 5.
should I force allowDangerousEmailAccountLinking? and how to?
I prefer create a page.tsx or error.tsx to explain to user. And the user can then retry a connection using the correct provider.
This is my auth function
Beta Was this translation helpful? Give feedback.
All reactions