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

Request access token and refresh token using auth_code #321

Open
raju249 opened this issue Sep 12, 2020 · 2 comments
Open

Request access token and refresh token using auth_code #321

raju249 opened this issue Sep 12, 2020 · 2 comments

Comments

@raju249
Copy link

raju249 commented Sep 12, 2020

I am trying to find the flask-dance equivalent of oauth2client method

I am trying to integrate offline access and exchange auth_code for an access token and refresh token on the server-side.

I will get the auth_code from my frontend.

My frontend is in react and backend is entirely REST using flask.

Any help is much appreciated.

I am trying to follow an example from https://developers.google.com/identity/sign-in/web/server-side-flow

@daenney
Copy link
Collaborator

daenney commented Sep 12, 2020

Take a look at: https://github.com/singingwolfboy/flask-dance-google and don't forget to pass offline=True to make_google_blueprint.

@raju249
Copy link
Author

raju249 commented Sep 12, 2020

Oh, got it. And how do I pass the auth_code for getting refresh token and access token in exchange?

I did take a look before but I thought that example assumes to have a frontend to get user consent. In my case, js is doing that all consent stuff and sends auth_code to backend.

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