9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/generators/devise_otp/install_generator.rb', line 9
def add_configs
content = <<-CONTENT
# ==> Devise OTP Extension
# Configure OTP extension for devise
# How long should the user have to enter their token. To change the default, uncomment and change the below:
#config.otp_authentication_timeout = 3.minutes
# Change time drift settings for valid token values. To change the default, uncomment and change the below:
#config.otp_authentication_time_drift = 3
CONTENT
inject_into_file "config/initializers/devise.rb", content, :before => /end[ |\n|]+\Z/
end
|