summaryrefslogtreecommitdiffstats
path: root/askbot/conf/login_providers.py
diff options
context:
space:
mode:
Diffstat (limited to 'askbot/conf/login_providers.py')
-rw-r--r--askbot/conf/login_providers.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/askbot/conf/login_providers.py b/askbot/conf/login_providers.py
index e664fe52..dd269f14 100644
--- a/askbot/conf/login_providers.py
+++ b/askbot/conf/login_providers.py
@@ -126,7 +126,7 @@ providers = (
'ClaimID',
'Facebook',
'Flickr',
- 'Google Plus',
+ #'Google Plus',
'Mozilla Persona',
'Twitter',
'LinkedIn',
@@ -146,6 +146,12 @@ DISABLED_BY_DEFAULT = ('LaunchPad', 'Mozilla Persona')
NEED_EXTRA_SETUP = ('Google Plus', 'Twitter', 'Facebook', 'LinkedIn', 'identi.ca',)
+GOOGLE_METHOD_CHOICES = (
+ ('openid', 'OpenID (deprecated)'),
+ ('google-plus', 'Google Plus'),
+ ('disabled', _('disable')),
+)
+
for provider in providers:
if provider == 'local':
provider_string = unicode(_('local password'))
@@ -171,3 +177,18 @@ for provider in providers:
**kwargs
)
)
+
+ if provider == 'local':
+ #add Google settings here as one-off
+ settings.register(
+ livesettings.StringValue(
+ LOGIN_PROVIDERS,
+ 'SIGNIN_GOOGLE_METHOD',
+ default='openid',
+ choices=GOOGLE_METHOD_CHOICES,
+ description=_('Google login'),
+ help_text=_(
+ 'To enable Google-Plus login, OAuth keys are required in the "External keys" section'
+ )
+ )
+ )