forked from External/greenlight
If a user only has one configured provider redirect them to that provider (#647)
This commit is contained in:
parent
0e4adc0049
commit
42f7d4f8d2
|
@ -67,6 +67,12 @@ class UsersController < ApplicationController
|
||||||
flash[:alert] = I18n.t("registration.deprecated.new_signin")
|
flash[:alert] = I18n.t("registration.deprecated.new_signin")
|
||||||
session[:old_twitter_user_id] = params[:old_twitter_user_id] unless params[:old_twitter_user_id].nil?
|
session[:old_twitter_user_id] = params[:old_twitter_user_id] unless params[:old_twitter_user_id].nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
providers = configured_providers
|
||||||
|
if (!allow_user_signup? || !allow_greenlight_accounts?) && providers.count == 1 &&
|
||||||
|
!Rails.configuration.loadbalanced_configuration
|
||||||
|
return redirect_to "#{Rails.configuration.relative_url_root}/auth/#{providers.first}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# GET /ldap_signin
|
# GET /ldap_signin
|
||||||
|
|
Loading…
Reference in New Issue