Skip to content

Commit

Permalink
Use the fail method from Warden::Strategies::Base
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Jones committed Mar 11, 2024
1 parent ca19bbb commit 402a467
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def authenticate!
# We check the OTP, then defer to DatabaseAuthenticatable
super if validate(resource) { validate_otp(resource) }

raise(Devise.paranoid ? :invalid : :not_found_in_database) unless resource
fail(Devise.paranoid ? :invalid : :not_found_in_database) unless resource

# We want to cascade to the next strategy if this one fails,
# but database authenticatable automatically halts on a bad password
Expand Down

0 comments on commit 402a467

Please sign in to comment.