omniauth-spotify 0.0.11 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/lib/omniauth-spotify.rb +15 -1
- data/lib/omniauth-spotify/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6cfc7bc3f3960d5aafb19072df330b9fc114144
|
4
|
+
data.tar.gz: c47393c874d66fd154ced25e43c3fbf3f26c6ddc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1bacddc1f7689409a152dec14a07d92886a97e1175fb1151241361f767309ad0ce2410dffcdc02b11f24fa4d561d5a94b128f922f9e458749ef40cc4349c57a
|
7
|
+
data.tar.gz: 86a327b610d67113878c57e9afc4897555c3bcc3764564c14a111935ca3308036196b96f57eaa41a577ea61a0f4f23ab97edbacde45e93f9055208d271bbe937
|
data/README.md
CHANGED
@@ -51,6 +51,11 @@ To force a permission dialog being shown to the user, which also makes it possib
|
|
51
51
|
set either `request.env['rack.session'][:ommiauth_spotify_force_approval?]` or `flash[:ommiauth_spotify_force_approval?]` (Rails apps only)
|
52
52
|
to a truthy value on the request that performs the Omniauth redirection.
|
53
53
|
|
54
|
+
Alternately, you can pass `show_dialog=true` when you redirect to your spotify auth URL if you prefer not to use the session.
|
55
|
+
```
|
56
|
+
http://localhost:3000/auth/spotify?show_dialog=true
|
57
|
+
```
|
58
|
+
|
54
59
|
## Auth Hash Schema
|
55
60
|
|
56
61
|
* Authorization data is available in the `request.env['omniauth.auth'].credentials` -- a hash that also responds to
|
data/lib/omniauth-spotify.rb
CHANGED
@@ -61,7 +61,21 @@ module OmniAuth
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def authorize_params
|
64
|
-
super.tap
|
64
|
+
super.tap do |params|
|
65
|
+
if session.delete(FORCE_APPROVAL_KEY) ||
|
66
|
+
(session[:flash] && session[:flash]['flashes'] && session[:flash]['flashes'][FORCE_APPROVAL_KEY])
|
67
|
+
params[:show_dialog] = true
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def request_phase
|
73
|
+
%w[show_dialog].each do |v|
|
74
|
+
if request.params[v]
|
75
|
+
options[:authorize_params][v.to_sym] = request.params[v]
|
76
|
+
end
|
77
|
+
end
|
78
|
+
super
|
65
79
|
end
|
66
80
|
|
67
81
|
def callback_url
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-spotify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Claudio Poli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
@@ -60,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
60
|
version: '0'
|
61
61
|
requirements: []
|
62
62
|
rubyforge_project:
|
63
|
-
rubygems_version: 2.6.
|
63
|
+
rubygems_version: 2.6.11
|
64
64
|
signing_key:
|
65
65
|
specification_version: 4
|
66
66
|
summary: OmniAuth strategy for Spotify
|