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
def need_two_factor_authentication?(request)
request.ip != '127.0.0.1'
end
However, currently, the only user request is passed to the method and there is no way to access auth winning strategy to make a decision?
def need_two_factor_authentication?(auth)
if auth.winning_strategy.instance_of? Devise::Strategies::DatabaseAuthenticatable
return true
end
false # skip 2-factor authentication for token based logins
end
I think need_two_factor_authentication? method should accept auth as a parameter.
Thanks for your time!
The text was updated successfully, but these errors were encountered:
In the docs, there's a method:
However, currently, the only user request is passed to the method and there is no way to access auth winning strategy to make a decision?
I think
need_two_factor_authentication?
method should accept auth as a parameter.Thanks for your time!
The text was updated successfully, but these errors were encountered: