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

google oauth 2.0 #20

Closed
alexander-gridnev opened this issue Aug 15, 2013 · 5 comments
Closed

google oauth 2.0 #20

alexander-gridnev opened this issue Aug 15, 2013 · 5 comments

Comments

@alexander-gridnev
Copy link

After authentication I have in table 'social_auth_usersocialauth' extra_data={"token_type": "Bearer", "access_token": "ya29.AHES6ZQtbhA1K-CmCn8bvnZy.................AgCfk8", "expires": 3599} without refresh_token. I think refresh_token is a required part of response.

@bradbeattie
Copy link

Hey, I'm running into the same error here. When I initially authenticate using django-social-auth, I get the refresh_token, but if I remove the authentication and add it back in, there's no refresh_token to be found.

Did you run into this too? If so, did you discover the cause?

@omab
Copy link
Owner

omab commented Apr 25, 2014

According to Google, the refresh_token is only sent once (the first time), if you want it again the user must revoke your application access and then re-auth with it.

@bradbeattie
Copy link

Thanks! Setting SOCIAL_AUTH_REVOKE_TOKENS_ON_DISCONNECT = True in django-social-auth fixed this for me.

@alexander-gridnev
Copy link
Author

I was patched lib (added checking empty refresh_token in google response, and if it empty, not save it to db), it is not very good solution, but I think re-authing user every time, bad idea too..

@omab
Copy link
Owner

omab commented Apr 26, 2014

The re-auth is required by google, you talk about another issue which is already solved in python-social-auth.

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

3 participants