Discord OAuth, Prisma and MongoDB #4958
Unanswered
booleans-oss
asked this question in
Help
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Question 💬
I am currently discovering
next-auth
and tried to set up Discord OAuth2 with a MongoDB database and Prisma adapter. As mentioned in the doc, there are quite a few changes that need to be done for MongoDB to work with next-auth. However, it seems that the Discord provider has conflicts with these changes:id String @id @default(auto()) @map("_id") @db.ObjectId
-> Since change is required. However, it overwrites the ID given by the OAuth2 after a successful signIn.-
userId String @id @default(auto()) @map("id") @db.String
-> I tried using 2 different fields but the Discord OAuth2 returns null/undefined for the ID (when it should never be null/undefined since every Discord's users has an ID)So I quickly ran out of ideas to solve this problem.
How to reproduce ☕️
Contributing 🙌🏽
Yes, I am willing to help answer this question in a PR
Beta Was this translation helpful? Give feedback.
All reactions