How can I access and store my custom profile in my MongoDB? #2384
Unanswered
rajbirjohar
asked this question in
Help
Replies: 1 comment 2 replies
-
https://github.com/nextauthjs/adapters/issues/151 is probably related. Although adding https://github.com/nextauthjs/next-auth/blob/main/src/providers/github.js |
Beta Was this translation helpful? Give feedback.
2 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.
-
Hey guys, I've pretty much read through all the documentation and looked at the provided example but I cannot figure out/find out how to actually store my custom user profile (using the Github provider) in my MongoDB database because no matter what, it ignores my custom user profile. But I was able to successfully read it from the Github provider.
I just want to be able to add the
profile.login
/user login
(Github username) to my model. I also am lost on how to access it via my session such assession.user.login
.Below is the necessary code:
I'm thinking I have to make use of the callback functions but I'll be honest, the documentation on it is oblivious to me and I have not been able to find a super simple working example of using them.
I'm mainly confused on if I should/could use jwt even if i have a database that persists users. Then how can use the session callback to access the user items and if I would also be storing them in the DB here or if that involves the signIn callback.
I would much appreciate it if any of you could show me some example code since I find that helps me a lot. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions