sinatra_auth_github 0.12.0 → 0.12.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -163,9 +163,13 @@ module Sinatra
163
163
  app.helpers Helpers
164
164
 
165
165
  app.get '/auth/github/callback' do
166
- authenticate!
167
- return_to = session.delete('return_to') || _relative_url_for('/')
168
- redirect return_to
166
+ if params["error"]
167
+ redirect "/unauthenticated"
168
+ else
169
+ authenticate!
170
+ return_to = session.delete('return_to') || _relative_url_for('/')
171
+ redirect return_to
172
+ end
169
173
  end
170
174
  end
171
175
  end
@@ -1,7 +1,7 @@
1
1
  module Sinatra
2
2
  module Auth
3
3
  module Github
4
- VERSION = "0.12.0"
4
+ VERSION = "0.12.1"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra_auth_github
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-01 00:00:00.000000000 Z
12
+ date: 2013-01-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra