You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have just a very basic devise single user app and i'm trying to implement 2fa. I have the following:
def qrcode(user)
issuer = 'outlet-dev' #TODO environment specific here
label = "#{issuer}:#{current_user.email}"
if user.encrypted_otp_secret.nil?
user.encrypted_otp_secret = User.generate_otp_secret
user.save!
end
qrcode = user.otp_provisioning_uri(label, issuer: issuer)
end
I get a value stored in the 'encrypted_otp_secret' column, but the other two remain empty (encrypted_otp_secret_iv / _salt) which causes the user.otp_provisioning_uri(label, issuer: issuer) part to fail.
Are the iv and salt values supposed to be automatically filled?
I have just a very basic devise single user app and i'm trying to implement 2fa. I have the following:
def qrcode(user)
issuer = 'outlet-dev' #TODO environment specific here
label = "#{issuer}:#{current_user.email}"
if user.encrypted_otp_secret.nil?
user.encrypted_otp_secret = User.generate_otp_secret
user.save!
end
qrcode = user.otp_provisioning_uri(label, issuer: issuer)
end
I get a value stored in the 'encrypted_otp_secret' column, but the other two remain empty (encrypted_otp_secret_iv / _salt) which causes the user.otp_provisioning_uri(label, issuer: issuer) part to fail.
Are the iv and salt values supposed to be automatically filled?
devise 4.8.1
devise-two-factor 4.0.1
attr_encrypted 3.1.0
rails 6.1.4.4
ruby 3.0.0
Thanks!
The text was updated successfully, but these errors were encountered: