Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix failure flow

  • Loading branch information...
commit 77a3b604c932a3b76173d5cbd486d0315ee61a7c 1 parent 432ae49
Jesse Stuart authored October 03, 2012

Showing 1 changed file with 5 additions and 4 deletions. Show diff stats Hide diff stats

  1. 9  lib/omniauth/strategies/tent.rb
9  lib/omniauth/strategies/tent.rb
@@ -38,10 +38,6 @@ def request_phase
38 38
         end
39 39
       rescue AppCreateFailure => e
40 40
         fail!(:app_create_failure, e)
41  
-      rescue AppAuthorizationCreateFailure => e
42  
-        fail!(:app_authorization_create_failure, e)
43  
-      rescue StateMissmatchError => e
44  
-        fail!(:state_missmatch) 
45 41
       end
46 42
 
47 43
       def callback_phase
@@ -49,6 +45,11 @@ def callback_phase
49 45
         create_app_authorization!
50 46
         build_auth_hash!
51 47
         call_app!
  48
+      rescue AppAuthorizationCreateFailure => e
  49
+        create_app
  50
+        build_uri_and_redirect!
  51
+      rescue StateMissmatchError => e
  52
+        fail!(:state_missmatch) 
52 53
       end
53 54
 
54 55
       private

0 notes on commit 77a3b60

Please sign in to comment.
Something went wrong with that request. Please try again.