Remove user/sessions#two_factor_entry

This commit is contained in:
Dominik Kwiatek 2020-10-23 21:00:06 +02:00
parent 66cccbb5d6
commit 702156258c
2 changed files with 1 additions and 12 deletions

View File

@ -31,16 +31,6 @@ class User::SessionsController < Devise::SessionsController
end
end
def two_factor_entry
unless session.has_key? :user_sign_in_uid
redirect_to root_url
return
end
self.resource = User.find(session[:user_sign_in_uid])
render 'auth/two_factor_authentication'
end
private
def continue_sign_in(resource, resource_name)

View File

@ -47,9 +47,8 @@ Rails.application.routes.draw do
devise_for :users, path: 'user', skip: [:sessions, :registrations]
as :user do
# :sessions
get 'sign_in' => 'devise/sessions#new', as: :new_user_session
get 'sign_in' => 'user/sessions#new', as: :new_user_session
post 'sign_in' => 'user/sessions#create', as: :user_session
get 'otp_auth' => 'user/sessions#two_factor_entry', as: :user_two_factor_entry
delete 'sign_out' => 'devise/sessions#destroy', as: :destroy_user_session
# :registrations
get 'settings/delete_account' => 'devise/registrations#cancel', as: :cancel_user_registration