OAuthAccountNotLinked #1601
Replies: 13 comments 14 replies
-
Im dealing with the exact same issue. Help needed! |
Beta Was this translation helpful? Give feedback.
-
Cool, so it could be related to the custom user schema. Still not sure how
to fix it, but if I find a time, I'll replicate the issue with a sample
repository and open this as a bug again (or you can).
…On Thu, 1 Apr 2021 at 02:45, Zach White ***@***.***> wrote:
Same here. My Google signin attempt send this answer on my live site (not
locally) as soon as I switched out my database option with an adapter
with a custom User schema.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1601 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABLZOF2Q23PNRYRCKNM4GTTGO625ANCNFSM42A2N3OA>
.
|
Beta Was this translation helpful? Give feedback.
-
Dealing with same error too... :( |
Beta Was this translation helpful? Give feedback.
-
Having the same error with Github's OAuth |
Beta Was this translation helpful? Give feedback.
-
Instead of adding these little useful comments, please someone create a proper reproduction, and open a bug report, otherwise we won't be able to look into this problem. |
Beta Was this translation helpful? Give feedback.
-
I was having this error, and it took me a while, but I actually found that I was somehow signed in. The useSession should have stopped the sign in buttons showing, but something wasn't aligning. I simply went to http://localhost:3000/api/auth/signout and it allowed me to sign out and then I could sign in again. This might be the issue others are facing, so thought I'd post here. |
Beta Was this translation helpful? Give feedback.
-
For me, my db model was incorrect. I figured it out by calling all of the adapter's methods, i.e. const adapter = DynamoDBAdapter(client, { tableName: "next-auth" });
const userById = await adapter.getUser(userId);
const updatedUser = await adapter.updateUser(user);
const userByEmail = await adapter.getUserByEmail(email); // I was getting `null` here
// ... The |
Beta Was this translation helpful? Give feedback.
-
I get this error too. Can we let users login then in account setting they can link social account with their email? Ex:
|
Beta Was this translation helpful? Give feedback.
-
Had this issue as well, turns out my database had the wrong data type for the token columns. Only found this output when debug mode was turned on:
This results in a User being created but the linked account was never created. The first time this happens the error is |
Beta Was this translation helpful? Give feedback.
-
I had this problem too. I only have GitHub and email provider, and I'm using Prisma with MySQL provider. So to fix this I've added one more field in the Account model in prisma file I'm not sure about other OAuth providers, but GitHub expects this field to be there, otherwise I get an error: I hope this was helpful. |
Beta Was this translation helpful? Give feedback.
-
I encountered this error when trying to setup (github oauth, dynamodb-adapter) combo. The cause and ultimate resolution of my problem was a dynamodb table schema definition error on my part (global secondary index projection type was set to "KEYS_ONLY" when it should have been "ALL"). |
Beta Was this translation helpful? Give feedback.
-
I documented how I solved this issue here: #519 (comment). Hope it helps someone! |
Beta Was this translation helpful? Give feedback.
-
Hay its simple error. YOu can fix it in very easy way.
|
Beta Was this translation helpful? Give feedback.
-
Your question
Any idea why I am consistently getting OAuthAccountNotLinked with only one provider?
What are you trying to do
This is basically a copy of this issue #519 - only differences are that I am using google provider in my own project. I didn't even changed the callback url or anything like that. I did changed jwt setting mentioned as a remedy in bug #519 but it didn't helped.
Reproduction
I actually don't know what is causing the problem. There is no error in debug mode and all information seems to be okay to my eye. Creating a new user at the same time works fine.
Feedback
Documentation refers to searching through online documentation, code comments and issue history. The example project refers to next-auth-example.
Beta Was this translation helpful? Give feedback.
All reactions