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

django-allauth support for obtaining google access-token #234

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ak4zh
Copy link

@ak4zh ak4zh commented Aug 30, 2020

No description provided.

@@ -17,37 +20,45 @@ class RefreshTokenNotFound(Exception):


def get_google_consumer_key():
if SocialApp:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this should be a configuration option as using django-allauth and django-guardian in one application doesn't necessarily mean that django-allauth provides a secret for django-guardian.

return settings.SOCIAL_AUTH_GOOGLE_OAUTH2_KEY


def get_google_consumer_secret():
if SocialApp:
app = SocialApp.objects.filter(provider='google').first()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Picking the first all auth google account is not deterministic enough if it's used to provide end-user authentication...

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

Successfully merging this pull request may close these issues.

4 participants