Closed Khaaz closed 9 months ago
We could not detect a valid reproduction link. Make sure to follow the bug report template carefully.
To be able to investigate, we need access to a reproduction to identify what triggered the issue. We need a link to a public GitHub repository. Example: (NextAuth.js example repository).
The bug template that you filled out has a section called "Reproduction URL", which is where you should provide the link to the reproduction.
Depending on the reason the issue was closed, you can do the following:
In general, assume that we should not go through a lengthy onboarding process at your company code only to be able to verify an issue.
In most cases, a private repo will not be a sufficient minimal reproduction, as this codebase might contain a lot of unrelated parts that would make our investigation take longer. Please do not make it public. Instead, create a new repository using the templates above, adding the relevant code to reproduce the issue. Common things to look out for:
Anyone experiencing the same issue is welcome to provide a minimal reproduction following the above steps by opening a new issue.
We look into every issue and monitor open issues for new comments.
However, sometimes we might miss a few due to the popularity/high traffic of the repository. We apologize, and kindly ask you to refrain from tagging core maintainers, as that will usually not result in increased priority.
Upvoting issues to show your interest will help us prioritize and address them as quickly as possible. That said, every issue is important to us, and if an issue gets closed by accident, we encourage you to open a new one linking to the old issue and we will look into it.
Adapter type
Custom adapter
Environment
System: OS: Windows 10 10.0.19045 CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor Memory: 6.29 GB / 15.95 GB Binaries: Node: 20.9.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.11 - ~\AppData\Roaming\npm\yarn.CMD npm: 10.1.0 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Spartan (44.19041.3636.0), Chromium (119.0.2151.97)
Internet Explorer: 11.0.19041.3636 npmPackages: next: ^14.0.3 => 14.0.3 next-auth: ^4.24.5 => 4.23.1 react: ^18.2.0 => 18.2.0
Reproduction URL
https://owle.bot
Describe the issue
I use next auth to handle signin and linking account with user. I want to be able to link several account to the same user. It works fine when I login with one account, link another account etc. The issue occurs when I try to link an account that I already signed with before. Right now there are no way to override the current process see the code here: https://github.com/nextauthjs/next-auth/blob/b5de00016f37047b3b84700757556f71c982f76d/packages/core/src/lib/actions/callback/handle-login.ts#L139
Here the code for my custom adapter:
How to reproduce
Expected behavior
The expected behaviour is to be able to either:
linkAccount
method with additional parameters to clearly identify the current logged on user if it exists and the new account to linklinkExistingAccount
) with same parameters that will allow us to handle this caseWe should be able to handle ourself this case, and decide whether we want to override the link process or not.
In my case I want to be able to link the new account to the user that requester it, no matter if it already was linked to a user before.
This is a huge blocking issue for me right now. Could that be implemented or extended easily on my side? Or are there any workaround allowing me to achieve a similar result?