Skip to content

Commit

Permalink
now display error toast instead of 404 page when LDAP authentication …
Browse files Browse the repository at this point in the history
…fails
  • Loading branch information
Ithanil committed Apr 22, 2024
1 parent e74b277 commit f2d6eb8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/controllers/external_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,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
Expand Down
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit f2d6eb8

Please sign in to comment.