Added optional two-factor authentication
This commit is contained in:
parent
237cb41ab4
commit
ba192f12e3
16 changed files with 146 additions and 15 deletions
|
@ -5,6 +5,8 @@ class Auth::SessionsController < Devise::SessionsController
|
|||
|
||||
layout 'auth'
|
||||
|
||||
before_action :configure_sign_in_params, only: [:create]
|
||||
|
||||
def create
|
||||
super do |resource|
|
||||
remember_me(resource)
|
||||
|
@ -13,6 +15,10 @@ class Auth::SessionsController < Devise::SessionsController
|
|||
|
||||
protected
|
||||
|
||||
def configure_sign_in_params
|
||||
devise_parameter_sanitizer.permit(:sign_in, keys: [:otp_attempt])
|
||||
end
|
||||
|
||||
def after_sign_in_path_for(_resource)
|
||||
last_url = stored_location_for(:user)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue