From: Tim Richardson Date: Wed, 21 Dec 2011 22:06:42 +0000 (+0000) Subject: Since "Google-Oauth2" is called precisely that and we want to use "GOOGLE_OAUTH2_AUTH... X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=f7690c93a0d28e11059d449c6b3bf8316f4f3bd6;p=django-social-auth.git Since "Google-Oauth2" is called precisely that and we want to use "GOOGLE_OAUTH2_AUTH_EXTRA_ARGUMENTS = {'access_type': 'offline'}" in our settings we must replace "-" with "_" --- diff --git a/social_auth/backends/__init__.py b/social_auth/backends/__init__.py index 53c6cb3..91c6f8d 100644 --- a/social_auth/backends/__init__.py +++ b/social_auth/backends/__init__.py @@ -311,7 +311,7 @@ class BaseAuth(object): """Return extra argumens needed on auth process, setting is per bancked and defined by _AUTH_EXTRA_ARGUMENTS. """ - name = self.AUTH_BACKEND.name.upper() + '_AUTH_EXTRA_ARGUMENTS' + name = self.AUTH_BACKEND.name.upper().replace('-','_') + '_AUTH_EXTRA_ARGUMENTS' return getattr(settings, name, {}) @property