Move legacy otp secret initializer to concern instead

This commit is contained in:
Matt Jankowski 2023-12-10 11:17:13 -05:00
parent 700e9040b2
commit 676fa84aff
2 changed files with 4 additions and 4 deletions

View File

@ -1,14 +1,13 @@
# frozen_string_literal: true
# TODO: This file is here for legacy support during devise-two-factor upgrade.
# It should be removed after all records have been migrated to the new approach.
# It should be removed after all records have been migrated.
class User
# ...
module LegacyOtpSecret
extend ActiveSupport::Concern
private
##
# Decrypt and return the `encrypted_otp_secret` attribute which was used in
# prior versions of devise-two-factor
# @return [String] The decrypted OTP secret

View File

@ -54,6 +54,7 @@ class User < ApplicationRecord
)
include LanguagesHelper
include LegacyOtpSecret
include Redisable
include User::HasSettings
include User::LdapAuthenticable