Closed blefnk closed 1 year ago
Thanks to the Drizzle NextAuth.js adapter, accounts linking is now works automatically. If you use the same email for authentication as before, NextAuth.js will handle everything on its own.
So, I rewrote the system from my own multi-account implementation to a more classical one, and everything now works as it should. This issue is resolved.
But if anyone has an idea to improve my custom multi-account implementation, just check 1.0.0 commit and create a Pull Request and I will definitely consider it.
I will commit the new version of Relivator soon and close this issue; everything now works well.
Relivator v1.1.0 has been released! 🎊 It now offers an improved user authentication process, with the ability to switch technologies on-the-fly, such as NextAuth.js/Clerk and PostgreSQL/MySQL! Even more improvements are on the way!
The app currently has a limitation where it treats all logged-in users as if they were the first user who registered. This means that even if you log in with different providers or create another one user, the system still recognizes everyone as that first user.
Because of this, only the first user can link their social accounts, blocking other users from doing the same.
I suspect this issue might be related to the
Cuid2()
function used for automatic string generation for user'sid
in the Drizzle schema filesrc/data/db/schema.ts
. Previously, auto-increment was used, using prime numbers with aserial()
function.I'm actively working to resolve this problem and would appreciate any contributions, whether it's through Pull Requests or by conducting research and testing to help diagnose the issue.