enable 2FA for manager
when trying to access manager, if superadmin did'nt enable otp, he/she is redirected to a page to enable 2FA. When superadmin is enabling 2FA, he has to to scan a qrcode with the 2FA application client. And afterwards, the superadmin has to log in with email, password and OTP code.
This commit is contained in:
parent
3fdb045356
commit
2a0ebd062a
14 changed files with 141 additions and 20 deletions
|
@ -77,8 +77,10 @@ Rails.application.routes.draw do
|
|||
# Authentication
|
||||
#
|
||||
|
||||
devise_for :administrations,
|
||||
skip: [:registrations]
|
||||
devise_for :administrations, skip: [:registrations]
|
||||
|
||||
get 'administrations/edit_otp', to: 'administrations#edit_otp', as: 'edit_administration_otp'
|
||||
put 'administrations/enable_otp', to: 'administrations#enable_otp', as: 'enable_administration_otp'
|
||||
|
||||
devise_for :users, controllers: {
|
||||
sessions: 'users/sessions',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue