diff --git a/app/controllers/external_controller.rb b/app/controllers/external_controller.rb index a461c32e23..efd6312676 100644 --- a/app/controllers/external_controller.rb +++ b/app/controllers/external_controller.rb @@ -90,6 +90,12 @@ def create_user redirect_to root_path(error: Rails.configuration.custom_error_msgs[:external_signup_error]) end + # GET /auth/failure + # Provide the user with a proper error message in case of external authentication failure + def auth_failure + redirect_to root_path(error: Rails.configuration.custom_error_msgs[:external_signup_error]) + end + # POST /recording_ready # Creates the recording in Greenlight using information received from BigBlueButton def recording_ready diff --git a/config/routes.rb b/config/routes.rb index b79b8b91cc..782ec13ac9 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -23,6 +23,7 @@ # External requests get '/auth/:provider/callback', to: 'external#create_user' post '/auth/:provider/callback', to: 'external#create_user' + get '/auth/failure', to: 'external#auth_failure' get '/meeting_ended', to: 'external#meeting_ended' post '/recording_ready', to: 'external#recording_ready'