[FIX] auth_oauth: pass reset, remove auto redirect when only one provider

Even if there is only one provider,
you could still use the internal login rather than
this oauth provider to sign in,
and therefore you need to remain on the regular
login page if you would like to reset your internal password
This commit is contained in:
Denis Ledoux
2016-08-29 11:46:35 +02:00
parent f0c8224175
commit 311f041f7f
-2
View File
@@ -119,8 +119,6 @@ class OAuthLogin(Home):
@http.route()
def web_auth_reset_password(self, *args, **kw):
providers = self.list_providers()
if len(providers) == 1:
werkzeug.exceptions.abort(werkzeug.utils.redirect(providers[0]['auth_link'], 303))
response = super(OAuthLogin, self).web_auth_reset_password(*args, **kw)
response.qcontext.update(providers=providers)
return response