Skip to content

Commit

Permalink
Add support for passing block when creating session
Browse files Browse the repository at this point in the history
  • Loading branch information
bbonislawski committed Apr 28, 2023
1 parent 36201e7 commit 3ebac56
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/devise_otp_authenticatable/hooks/sessions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def create_with_otp

otp_refresh_credentials_for(resource)

yield resource if block_given?
if otp_challenge_required_on?(resource)
challenge = resource.generate_otp_challenge!
warden.logout
Expand Down

0 comments on commit 3ebac56

Please sign in to comment.