diff --git a/examples/rails-todo-list-app/config/routes.rb b/examples/rails-todo-list-app/config/routes.rb index 9793782..6fc72f4 100644 --- a/examples/rails-todo-list-app/config/routes.rb +++ b/examples/rails-todo-list-app/config/routes.rb @@ -18,5 +18,5 @@ # This is where we are redirected if OmniAuth fails to authenticate the user. # user - match '/auth/:provider/failure', to: redirect('/'), via: [:get, :post] + match '/auth/failure', to: redirect('/'), via: [:get, :post] end diff --git a/examples/sinatra-multiple-providers-app/app.rb b/examples/sinatra-multiple-providers-app/app.rb index b242359..27259a3 100644 --- a/examples/sinatra-multiple-providers-app/app.rb +++ b/examples/sinatra-multiple-providers-app/app.rb @@ -45,7 +45,7 @@ end %w(get post).each do |method| - send(method, '/auth/:provider/failure') do + send(method, '/auth/failure') do "Aw shucks, we couldn't verify your identity!" end end diff --git a/lib/omniauth/strategies/azure_activedirectory.rb b/lib/omniauth/strategies/azure_activedirectory.rb index 20339c5..ea8ca7b 100644 --- a/lib/omniauth/strategies/azure_activedirectory.rb +++ b/lib/omniauth/strategies/azure_activedirectory.rb @@ -85,7 +85,7 @@ def request_phase # credentials at the authorization endpoint. def callback_phase error = request.params['error_reason'] || request.params['error'] - fail(OAuthError, error) if error + return fail!(error) if error @session_state = request.params['session_state'] @id_token = request.params['id_token'] @code = request.params['code']