[FIX] auth_oauth: remove redirect if there is only 1 provider

Forcing the redirection for 1 provider but not for 2 makes no sense.
Was done at 311f041f for the reset password, applied to signup too.

Closes #15032
This commit is contained in:
jaredkipe
2017-01-16 13:49:59 +01:00
committed by Martin Trigaux
parent 47c60db4a0
commit 4b500aa298
-2
View File
@@ -111,8 +111,6 @@ class OAuthLogin(Home):
@http.route()
def web_auth_signup(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_signup(*args, **kw)
response.qcontext.update(providers=providers)
return response