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
koa-grant: How to get the user info from session #20
Comments
I'm not sure that I understand your exact scenario, but here is what you can do - just store the access token somewhere in your database and link it to your user data. |
@simov thank you. What i want to do is, eg
After the above step, the login user access {
grant: {
provider: 'github',
dynamic: {}
}
} That means i can't find current users access token or any other useful information besides provider. Maybe a stupid question, thank you for your time. |
By default Grant returns the result data from the OAuth flow as a querystring, that's why you see only a meta data in the session that's used internally by Grant during the OAuth flow. If you want the result data returned in the session instead, you have to set Let me know if that solves your problem. |
@simov That make sense to me. Thank you a lot!! |
I want to find a way to get the user info from the session after login.
For example:
Seems I can't add a new property to session in the
/handle_provider_callback
, so I don't how to connect the special session with the db item (I want to store users in my db). Do you have any idea?Thank you.
The text was updated successfully, but these errors were encountered: