From 311f041f7f44bef1d5fe70c5f0c186ac1b913ee9 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Mon, 29 Aug 2016 11:44:14 +0200 Subject: [PATCH] [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 --- addons/auth_oauth/controllers/main.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py index b7c1f13cf6b..cd3d04b043d 100644 --- a/addons/auth_oauth/controllers/main.py +++ b/addons/auth_oauth/controllers/main.py @@ -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