From 816737be8decfc3289aa854b3acdfee3f2fbb3aa Mon Sep 17 00:00:00 2001 From: Aidan Cornelius-Bell Date: Sun, 12 Jan 2025 16:49:37 +1030 Subject: [PATCH] We were double encrypting OTP keys, and it made my head hurt --- app/models/user.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 7edf9b5..1726c37 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -3,8 +3,7 @@ class User < ApplicationRecord # :confirmable, :lockable, :timeoutable, :trackable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :validatable, - :confirmable, :lockable, :two_factor_authenticatable, :two_factor_backupable, - otp_secret_encryption_key: Rails.application.credentials.dig(:active_record_encryption, :primary_key) + :confirmable, :lockable, :two_factor_authenticatable, :two_factor_backupable encrypts :otp_secret attr_accessor :otp_plain_secret -- 2.39.5