0
0
Fork 0

Move OTP secret length to configuration (#32125)

This commit is contained in:
David Roetzel 2024-10-01 11:38:42 +02:00 committed by GitHub
parent 0b89765e9a
commit e6cda8388c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 8 additions and 7 deletions

View file

@ -71,7 +71,8 @@ class User < ApplicationRecord
ACTIVE_DURATION = ENV.fetch('USER_ACTIVE_DAYS', 7).to_i.days.freeze
devise :two_factor_authenticatable,
otp_secret_encryption_key: Rails.configuration.x.otp_secret
otp_secret_encryption_key: Rails.configuration.x.otp_secret,
otp_secret_length: 32
include LegacyOtpSecret # Must be after the above `devise` line in order to override the legacy method