From: Tom Hughes Date: Tue, 4 Jan 2022 12:02:16 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/3408' X-Git-Tag: live~1815 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/b300c03b9936c37ff488c0d2bb851061bfc8ac20?hp=b39e75c3036b2a1d17429c65100d994b8941b641 Merge remote-tracking branch 'upstream/pull/3408' --- diff --git a/app/controllers/concerns/session_methods.rb b/app/controllers/concerns/session_methods.rb index eb24f6b20..fca851eeb 100644 --- a/app/controllers/concerns/session_methods.rb +++ b/app/controllers/concerns/session_methods.rb @@ -8,7 +8,7 @@ module SessionMethods def auth_url(provider, uid, referer = nil) params = { :provider => provider } - params[:openid_url] = openid_expand_url(uid) if provider == "openid" + params[:openid_url] = uid if provider == "openid" if referer.nil? params[:origin] = request.path @@ -20,23 +20,6 @@ module SessionMethods auth_path(params) end - ## - # special case some common OpenID providers by applying heuristics to - # try and come up with the correct URL based on what the user entered - def openid_expand_url(openid_url) - if openid_url.nil? - nil - elsif openid_url.match(%r{(.*)gmail.com(/?)$}) || openid_url.match(%r{(.*)googlemail.com(/?)$}) - # Special case gmail.com as it is potentially a popular OpenID - # provider and, unlike yahoo.com, where it works automatically, Google - # have hidden their OpenID endpoint somewhere obscure this making it - # somewhat less user friendly. - "https://www.google.com/accounts/o8/id" - else - openid_url - end - end - ## # process a successful login def successful_login(user, referer = nil)