-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom MongoDB Document Storage #604
Comments
:D Me too, many people ask for this. Keep watching here for a time |
Mmh alright. I was experimenting with callbacks and such but that isn't getting too far. Only solution I have so far I sis to get the csrf token (or however its spelled), making a requesting using that, and having the DB find the user document, get the ID and then match that to another document in the "data" collection. |
You can use the MongoDB API to access the database. If you want to extend the built-in models used with the default adapter, there is a tutorial on how to do that. Note: Additional fields cannot currently be captured at login, they can only be captured after an account has been created. This is something that might change in future - I'm considering something like returning a If you want to capture additional fields after sign in, you can use the |
What would be the best way to query the DB for a user? I've seen we can access the access token (from getSession()) and csrfToken (from getcCsrfToken). However, I can't find where the csrfToken is stored in the DB. Would it be safe to just stick with the access token? |
Hi there! It looks like this issue hasn't had any activity for a while. It will be closed if no further activity occurs. If you think your issue is still relevant, feel free to comment on it to keep ot open. Thanks! |
Hi there! It looks like this issue hasn't had any activity for a while. To keep things tidy, I am going to close this issue for now. If you think your issue is still relevant, just leave a comment and I will reopen it. (Read more at #912) Thanks! |
Your question
How do I store custom data with the MongoDB document?
What are you trying to do
I'm trying to store custom data with the document in the users collection
The text was updated successfully, but these errors were encountered: