-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Token refreshing #52
Comments
using |
at refresh_token() method
So I wrote
Something wrong? |
I think it is this (if self.REFRESH_TOKEN_METHOD == 'POST') at social.backends.oauth.BaseOAuth2
|
I see your code but not an error explanation, what happens when you run that code? What do you mean with "There is no SOCIAL_AUTH_GOOGLE_OAUTH2_KEY"? That's a needed setting to enable google-oauth2 backend. |
Problem is 1.Perhaps, forget to load the backend instances in load_strategy(). 2.If I do not specify a backend name, it is not possible to load the backend origin key and secret. Which backend should be use, maybe guess in refresh_token(). not work. can not find 'SOCIAL_AUTH_' + 'BACKEND_NAME' + '_KEY'
work
3.Though POST, It becomes the query parameter in the URL. Sorry about funny English. |
@kakky, I've checked the process, the problem was the parameters being passed to the request, since Google OAuth2 uses |
Thank you. It worked! |
No problem! |
How do I refresh token?
Writing old django-social-auth style
user = User.objects.get(...)
social = user.social_auth.filter(provider='google-oauth2')[0]
social.refresh_token()
but,
<type 'exceptions.TypeError'> refresh_token() takes at least 2 arguments (1 given)
at /social/storage/base/UserMixin.refresh_token()
How do I get strategy param?
The text was updated successfully, but these errors were encountered: