mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: For a single authenticator, do not interrupt registration flow
Followup to 0a14b9b42a2f597f5df26be97296a4d6909f6a34
This commit is contained in:
@ -722,8 +722,9 @@ class ApplicationController < ActionController::Base
|
||||
session[:destination_url] = destination_url
|
||||
redirect_to path('/session/sso')
|
||||
return
|
||||
elsif !SiteSetting.enable_local_logins && Discourse.enabled_authenticators.length == 1
|
||||
# Only one authentication provider, direct straight to it
|
||||
elsif !SiteSetting.enable_local_logins && Discourse.enabled_authenticators.length == 1 && !cookies[:authentication_data]
|
||||
# Only one authentication provider, direct straight to it.
|
||||
# If authentication_data is present, then we are halfway though registration. Don't redirect offsite
|
||||
cookies[:destination_url] = destination_url
|
||||
redirect_to path("/auth/#{Discourse.enabled_authenticators.first.name}")
|
||||
else
|
||||
|
Reference in New Issue
Block a user