Permalink
Browse files

Fix failure flow

  • Loading branch information...
1 parent 432ae49 commit 77a3b604c932a3b76173d5cbd486d0315ee61a7c Jesse Stuart committed Oct 3, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/omniauth/strategies/tent.rb
View
9 lib/omniauth/strategies/tent.rb
@@ -38,17 +38,18 @@ def request_phase
end
rescue AppCreateFailure => e
fail!(:app_create_failure, e)
- rescue AppAuthorizationCreateFailure => e
- fail!(:app_authorization_create_failure, e)
- rescue StateMissmatchError => e
- fail!(:state_missmatch)
end
def callback_phase
verify_state!
create_app_authorization!
build_auth_hash!
call_app!
+ rescue AppAuthorizationCreateFailure => e
+ create_app
+ build_uri_and_redirect!
+ rescue StateMissmatchError => e
+ fail!(:state_missmatch)
end
private

0 comments on commit 77a3b60

Please sign in to comment.