Skip to content

Commit

Permalink
Fixed 500 caused by 1 provider (bigbluebutton#937)
Browse files Browse the repository at this point in the history
  • Loading branch information
farhatahmad authored and jfederico committed Jan 28, 2020
1 parent 079d647 commit 984e5cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/controllers/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ class SessionsController < ApplicationController
def signin
check_if_twitter_account

@providers = configured_providers

if one_provider
provider_path = if Rails.configuration.omniauth_ldap
ldap_signin_path
else
"#{Rails.configuration.relative_url_root}/auth/#{providers.first}"
"#{Rails.configuration.relative_url_root}/auth/#{@providers.first}"
end

return redirect_to provider_path
Expand Down Expand Up @@ -156,9 +158,7 @@ def session_params
end

def one_provider
providers = configured_providers

(!allow_user_signup? || !allow_greenlight_accounts?) && providers.count == 1 &&
(!allow_user_signup? || !allow_greenlight_accounts?) && @providers.count == 1 &&
!Rails.configuration.loadbalanced_configuration
end

Expand Down

0 comments on commit 984e5cc

Please sign in to comment.