Skip to content

Commit

Permalink
Disable exception catching for bad tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
josepegea committed Oct 30, 2024
1 parent 60e0faf commit c4bc489
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/omni_auth/strategies/email.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ def callback_phase
token = request.params['token']
fail!(:authenticity_error) if token.blank?

begin
decoded_token = EmailAuthToken.decode(token)
rescue StandardError => e
fail!(:authenticity_error, e)
end
# Not catching the exception until this is more tested
# This way we'll get it reported in AppSignal for diagnosing
decoded_token = EmailAuthToken.decode(token)

@email = decoded_token['iss'].to_s.downcase
fail!(:authenticity_error) if @email.blank?
Expand Down

0 comments on commit c4bc489

Please sign in to comment.