How to Manage "To confirm your identity, sign in with the same account you used originally." #10631
Replies: 2 comments 3 replies
-
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.
2 replies
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.
-
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