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
It adds the following code to config/initializers/devise.rb file:
config.warden do |manager|
manager.default_strategies(:scope => :user).unshift :two_factor_authenticatable
end
However, everything works fine if I comment it out. Moreover, if I print out the array returned by manager.default_strategies(:scope => :user) it shows two duplicate items [:two_factor_authenticatable, :two_factor_authenticatable]. I'm using this code to print it out:
config.warden do |manager|
manager.default_strategies(:scope => :user).unshift :two_factor_authenticatable
pp 'manager.default_strategies', manager.default_strategies(:scope => :user)
end
It looks like the generator for the config/initializers/devise.rb can be removed since the :two_factor_authenticatable Warden strategy for the User is already added when we do
class User < ApplicationRecord
devise :two_factor_authenticatable
?
I'm using devise-two-factor (5.0.0), devise (4.8.1) and rails (7.0.3.1).
The text was updated successfully, but these errors were encountered:
Hi,
When I run the generator
It adds the following code to
config/initializers/devise.rb
file:However, everything works fine if I comment it out. Moreover, if I print out the array returned by
manager.default_strategies(:scope => :user)
it shows two duplicate items[:two_factor_authenticatable, :two_factor_authenticatable]
. I'm using this code to print it out:It looks like the generator for the
config/initializers/devise.rb
can be removed since the :two_factor_authenticatable Warden strategy for the User is already added when we do?
I'm using devise-two-factor (5.0.0), devise (4.8.1) and rails (7.0.3.1).
The text was updated successfully, but these errors were encountered: