Commit 68780d29 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix token_set? method by checking migration status

parent 239a4f72
......@@ -88,7 +88,10 @@ module TokenAuthenticatableStrategies
def token_set?(instance)
raw_token = instance.read_attribute(encrypted_field)
raw_token ||= (insecure_strategy.get_token(instance) if fallback?)
unless fully_encrypted?
raw_token ||= insecure_strategy.get_token(instance)
end
raw_token.present?
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment