Closed janko closed 3 years ago
Thank you for your excellent work in diagnosing the cause of the problem. Is this something you feel comfortable submitting a spec and fix? If not, I can do so. I assume the simplest fix is adding return false unless
to the previous line, but I haven't tested that.
I'm actually a bit busy at the moment (I'm behind on a technical review for a certain book about ruby programming 😉), so if you have time to look into it, that would be great 🙂
I understand completely. :) I should be able to take care of this today. Thanks!
In the verify_account_grace_period feature, when the grace period expires, the
#account_in_unverified_grace_period?
method raises a NoMethodError due toaccount
being nil. Here is a minimal self-contained example that reproduces the problem:The error happens on this line, due to
#account_from_session
method not loading the@account
. It's most likely due to#_account_from_session
adding#account_session_status_filter
to the account dataset filter, which filters out accounts that have unverified status once the grace period expires.Note that I'm not calling this method directly in my app, but I have a condition on
#uses_two_factor_authentication?
, which together with email_auth feature calls#possible_authentication_methods => #allow_email_auth? => #account_in_unverified_grace_period?
.