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.
- data/lib/sinatra/auth/github.rb +7 -3
- data/lib/sinatra/auth/github/version.rb +1 -1
- metadata +2 -2
data/lib/sinatra/auth/github.rb
CHANGED
@@ -163,9 +163,13 @@ module Sinatra
|
|
163
163
|
app.helpers Helpers
|
164
164
|
|
165
165
|
app.get '/auth/github/callback' do
|
166
|
-
|
167
|
-
|
168
|
-
|
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
|
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.
|
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:
|
12
|
+
date: 2013-01-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|