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 am using devise-two-factor in a Rails 6 application. However, I have the following issue.
If I do a select without including encrypted_otp_secret attributes, I get the following error:
ActiveModel::MissingAttributeError: missing attribute: encrypted_otp_secret
from /usr/local/bundle/gems/activemodel-6.1.4.1/lib/active_model/attribute.rb:222:in `value'
The error can be reproduced by running: User.select(:email).first.to_json
But works if I do: User.select(:email, :encrypted_otp_secret, :encrypted_otp_secret_iv, :encrypted_otp_secret_salt).first.to_json
I suppose there is an after_commit callback running and causing the issue. Is this expected? Is there a way around this?
The text was updated successfully, but these errors were encountered:
I am using devise-two-factor in a Rails 6 application. However, I have the following issue.
If I do a select without including
encrypted_otp_secret
attributes, I get the following error:The error can be reproduced by running:
User.select(:email).first.to_json
But works if I do:
User.select(:email, :encrypted_otp_secret, :encrypted_otp_secret_iv, :encrypted_otp_secret_salt).first.to_json
I suppose there is an
after_commit
callback running and causing the issue. Is this expected? Is there a way around this?The text was updated successfully, but these errors were encountered: