Permalink
Browse files

Fix auth flow when app lookup fails

  • Loading branch information...
1 parent 47e33de commit cfbac38549149820c785700b937bb2d557021e13 Jesse Stuart committed Dec 16, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/omniauth/strategies/tent.rb
@@ -94,8 +94,8 @@ def find_or_create_app!
:mac_algorithm => app[:mac_algorithm])
if app[:id]
res = client.app.get(app[:id])
- if res.body.kind_of?(::String)
- if ((400...500).to_a - [404]).include?(res.status)
+ if !res.success?
+ if (400...500).include?(res.status)
create_app and return
else
raise AppLookupFailure.new(res.inspect)

0 comments on commit cfbac38

Please sign in to comment.