Can't include access token to Session #3473
Unanswered
shellingford330
asked this question in
Help
Replies: 1 comment
-
I had a similar situation. waiting a solution in v4 |
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.
-
Question 💬
In V3, the access token was included in the DefaultSession, but in V4, the Adapter API has been simplified. (https://github.com/nextauthjs/next-auth/pull/2361/files)
Thank you.
However, I use the adapter to connect to my own API. That API returns an access token (NOT from provider), but how do I include the access token in the Session?
I don't think it's appropriate to use Callback to query the API and get the access token.
This is because the API should return the access token only at login (create session).
I would like to be able to extend the Session object.
How to reproduce ☕️
Explained in the description.
Contributing 🙌🏽
Yes, I am willing to help answer this question in a PR
Beta Was this translation helpful? Give feedback.
All reactions