Skip to content
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

Making a request outside of the callback #14

Open
JayChetty opened this issue Jul 17, 2016 · 1 comment
Open

Making a request outside of the callback #14

JayChetty opened this issue Jul 17, 2016 · 1 comment

Comments

@JayChetty
Copy link

Hi,

Thanks for the library and this example.

I was wondering how to make a request to the Oauth provider outside the callback action.
In the example we use the whole received token to make the request, but only store token.access_token on the session.
How can we make a request using the stored access_token?

Thanks again,
Jay

@scrogson
Copy link
Owner

Hi @JayChetty,

Basically what you'd probably do in a real application is store the token in the database associated with the user record. You could update the token whenever the user logs into your application and fetch data anytime.

I'm working on improvements to the OAuth2 library and will probably expand this example app to use Ecto for a more realistic scenario.

Hope that helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants