forked from External/greenlight
explicitly call #omniauth_fail
This commit is contained in:
parent
40cb48a10a
commit
00a3deec29
@ -25,10 +25,11 @@ class SessionsController < ApplicationController
|
||||
login(user)
|
||||
rescue => e
|
||||
logger.error "Error authenticating via omniauth: #{e}"
|
||||
omniauth_fail
|
||||
end
|
||||
|
||||
# POST /auth/failure
|
||||
def fail
|
||||
def omniauth_fail
|
||||
redirect_to root_path, notice: I18n.t(params[:message], default: I18n.t("omniauth_error"))
|
||||
end
|
||||
|
||||
|
@ -26,7 +26,7 @@ Rails.application.routes.draw do
|
||||
|
||||
# Handles Omniauth authentication.
|
||||
match '/auth/:provider/callback', to: 'sessions#omniauth', via: [:get, :post], as: :omniauth_session
|
||||
get '/auth/failure', to: 'sessions#fail'
|
||||
get '/auth/failure', to: 'sessions#omniauth_fail'
|
||||
|
||||
# Room resources.
|
||||
resources :rooms, only: [:create, :show, :destroy], param: :room_uid, path: '/'
|
||||
|
Loading…
x
Reference in New Issue
Block a user