Account connecting(or linking) feature implement #7877
Unanswered
ChiuMungZitAlexander
asked this question in
Help
Replies: 2 comments
-
facing the same problem right now |
Beta Was this translation helpful? Give feedback.
0 replies
-
@ChiuMungZitAlexander were you able to resolve this? |
Beta Was this translation helpful? Give feedback.
0 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.
Uh oh!
There was an error while loading. Please reload this page.
-
I am creating an dApp by the help of
next-auth
.We only allow users to sign in with Ethereum/Polygon/Sui. After the user has session, there should be a user record, as well as an account record in database as below.
User collection
Account collection
We also have a setting page to let the user connect Twitter and Discord. Then the user will be able to login by the connected Twitter or Discord account. The page where the user connects Twitter or Discord must be with a session.
I just found that if I directly call
signIn
fromnext-auth/react
to connect the user's Twitter or Discord account, it will just create a new account record, but not a new user record.User collection, NO CHANGE
Account collection, A NEW ACCOUNT
It's just what I want, but I wonder if it is the recommended or common practice.
Cheers!
Beta Was this translation helpful? Give feedback.
All reactions