[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user