omniauth-spotify 0.0.13 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/README.md +85 -101
- data/lib/omniauth/spotify/version.rb +7 -0
- data/lib/omniauth/spotify.rb +4 -0
- data/lib/omniauth/strategies/spotify.rb +103 -0
- data/lib/omniauth-spotify/version.rb +6 -1
- data/lib/omniauth-spotify.rb +2 -90
- data/omniauth-spotify.gemspec +29 -16
- metadata +42 -22
- data/.gitignore +0 -17
- data/Gemfile +0 -4
- data/Rakefile +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: a1468293039a29cd8d1f4757139d5fece6bae3ac3c73f1f4275ae4553d0405c3
|
|
4
|
+
data.tar.gz: d7275eb0deb58c3b24310b50aef1216fc4970ac6cb4dab4e6efa798dfdc17efe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '091df662a286585d04d94895780f1e7bf7603fe23959ff0e12f9d86306577c7f88a6ed3cba009dfed146c50adc35a8cffcbee17c3716bd62f4e8294fd779e943'
|
|
7
|
+
data.tar.gz: 8c4d1d9d2b6d23c623159128ce271ec3bbb1880cfb400d13cc616ca2ec72d5b0d931caee92e16e36b689b8be34ffafabefc78689f9a76eb6cfb77016c7497dd9
|
data/README.md
CHANGED
|
@@ -1,138 +1,122 @@
|
|
|
1
|
-
# Spotify
|
|
1
|
+
# OmniAuth Spotify Strategy
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://github.com/icoretech/omniauth-spotify/actions/workflows/test.yml?query=branch%3Amain)
|
|
4
|
+
[](https://rubygems.org/gems/omniauth-spotify)
|
|
5
|
+
|
|
6
|
+
`omniauth-spotify` provides a Spotify OAuth2 strategy for OmniAuth.
|
|
4
7
|
|
|
5
8
|
## Installation
|
|
6
9
|
|
|
7
10
|
Add this line to your application's Gemfile:
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
$ bundle
|
|
12
|
+
```ruby
|
|
13
|
+
gem 'omniauth-spotify'
|
|
14
|
+
```
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
Then run:
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
```bash
|
|
19
|
+
bundle install
|
|
20
|
+
```
|
|
18
21
|
|
|
19
22
|
## Usage
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Usage of the gem is very similar to other OmniAuth strategies.
|
|
24
|
-
You'll need to add your app credentials to `config/initializers/omniauth.rb`:
|
|
24
|
+
Configure OmniAuth in your Rack/Rails app:
|
|
25
25
|
|
|
26
26
|
```ruby
|
|
27
|
-
keys = Rails.application.secrets
|
|
28
|
-
|
|
29
27
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
|
30
|
-
provider :spotify,
|
|
28
|
+
provider :spotify, ENV.fetch('SPOTIFY_CLIENT_ID'), ENV.fetch('SPOTIFY_CLIENT_SECRET'),
|
|
29
|
+
scope: 'user-read-email user-read-private'
|
|
31
30
|
end
|
|
32
31
|
```
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
Read more about scopes here: https://developer.spotify.com/web-api/using-scopes/
|
|
33
|
+
## Forcing a Permission Dialog
|
|
36
34
|
|
|
37
|
-
|
|
35
|
+
Spotify may skip the permission dialog when the user already granted access. To force it:
|
|
38
36
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
config.omniauth :spotify, keys.spotify['client_id'], keys.spotify['client_secret'], scope: 'playlist-read-private user-read-private user-read-email'
|
|
43
|
-
```
|
|
37
|
+
- set `request.env['rack.session']['omniauth_spotify_force_approval?'] = true`, or
|
|
38
|
+
- pass `show_dialog=true` on the auth request URL.
|
|
44
39
|
|
|
45
|
-
|
|
40
|
+
Backward compatibility is preserved for the historical misspelled key:
|
|
41
|
+
`ommiauth_spotify_force_approval?`.
|
|
46
42
|
|
|
47
|
-
|
|
48
|
-
In these cases, authorization sequences proceed without user interation.
|
|
43
|
+
## Auth Hash
|
|
49
44
|
|
|
50
|
-
|
|
51
|
-
set either `request.env['rack.session'][:ommiauth_spotify_force_approval?]` or `flash[:ommiauth_spotify_force_approval?]` (Rails apps only)
|
|
52
|
-
to a truthy value on the request that performs the Omniauth redirection.
|
|
45
|
+
Example payload from `request.env['omniauth.auth']` (real shape, anonymized):
|
|
53
46
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"uid": "1234567890",
|
|
50
|
+
"info": {
|
|
51
|
+
"name": "1234567890",
|
|
52
|
+
"nickname": "1234567890",
|
|
53
|
+
"email": "user@example.test",
|
|
54
|
+
"urls": {
|
|
55
|
+
"spotify": "https://open.spotify.com/user/1234567890"
|
|
56
|
+
},
|
|
57
|
+
"country_code": "IT",
|
|
58
|
+
"product": "free",
|
|
59
|
+
"follower_count": 24
|
|
60
|
+
},
|
|
61
|
+
"credentials": {
|
|
62
|
+
"token": "sample-access-token",
|
|
63
|
+
"refresh_token": "sample-refresh-token",
|
|
64
|
+
"expires_at": 1710000000,
|
|
65
|
+
"expires": true
|
|
66
|
+
},
|
|
67
|
+
"extra": {
|
|
68
|
+
"raw_info": {
|
|
69
|
+
"country": "IT",
|
|
70
|
+
"display_name": "1234567890",
|
|
71
|
+
"email": "user@example.test",
|
|
72
|
+
"explicit_content": {
|
|
73
|
+
"filter_enabled": false,
|
|
74
|
+
"filter_locked": false
|
|
75
|
+
},
|
|
76
|
+
"external_urls": {
|
|
77
|
+
"spotify": "https://open.spotify.com/user/1234567890"
|
|
78
|
+
},
|
|
79
|
+
"followers": {
|
|
80
|
+
"href": null,
|
|
81
|
+
"total": 24
|
|
82
|
+
},
|
|
83
|
+
"href": "https://api.spotify.com/v1/users/1234567890",
|
|
84
|
+
"id": "1234567890",
|
|
85
|
+
"images": [],
|
|
86
|
+
"product": "free",
|
|
87
|
+
"type": "user",
|
|
88
|
+
"uri": "spotify:user:1234567890"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
57
92
|
```
|
|
58
93
|
|
|
59
|
-
|
|
94
|
+
`info.image` and `info.birthdate` are included only when Spotify returns those fields.
|
|
60
95
|
|
|
61
|
-
|
|
62
|
-
the `token`, `refresh_token`, `expires_at`, and `expires` methods.
|
|
96
|
+
## Development
|
|
63
97
|
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"refresh_token" => "xxxx",
|
|
68
|
-
"expires_at" => 1403021232,
|
|
69
|
-
"expires" => true
|
|
70
|
-
}
|
|
98
|
+
```bash
|
|
99
|
+
bundle install
|
|
100
|
+
bundle exec rake
|
|
71
101
|
```
|
|
72
102
|
|
|
73
|
-
|
|
103
|
+
Run Rails integration tests with an explicit Rails version:
|
|
74
104
|
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
:nickname => "SomeName",
|
|
79
|
-
:email => "claudio@icorete.ch",
|
|
80
|
-
:urls => {"spotify" => "https://open.spotify.com/user/1111111111"},
|
|
81
|
-
:image => "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xfp1/t1.0-1/s320x320/301234_1962753760624_625151598_n.jpg",
|
|
82
|
-
:birthdate => Mon, 01 Mar 1993, # Date class
|
|
83
|
-
:country_code => "IT",
|
|
84
|
-
:product => "open",
|
|
85
|
-
:follower_count => 10
|
|
86
|
-
}
|
|
105
|
+
```bash
|
|
106
|
+
RAILS_VERSION='~> 8.1.0' bundle install
|
|
107
|
+
RAILS_VERSION='~> 8.1.0' bundle exec rake test_rails_integration
|
|
87
108
|
```
|
|
88
109
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
* Unless the `user-read-private` scope is included, the `birthdate`, `country`, `image`, and `product` fields may be `nil`,
|
|
92
|
-
and the `name` field will be set to the username/nickname instead of the display name.
|
|
93
|
-
* The email field will be nil if the 'user-read-email' scope isn't included.
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
* The raw response to the `me` endpoint call is also available in `request.env['omniauth.auth'].extra['raw_info']`. e.g.
|
|
110
|
+
## Compatibility
|
|
97
111
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"display_name" => "Claudio Poli",
|
|
102
|
-
"birthdate" => "1993-03-01",
|
|
103
|
-
"email" => "claudio@icorete.ch",
|
|
104
|
-
"external_urls" => {
|
|
105
|
-
"spotify" => "https://open.spotify.com/user/1111111111"
|
|
106
|
-
},
|
|
107
|
-
"followers" => {
|
|
108
|
-
"href" => nil,
|
|
109
|
-
"total" => 10
|
|
110
|
-
},
|
|
111
|
-
"href" => "https://api.spotify.com/v1/users/1111111111",
|
|
112
|
-
"id" => "1111111111",
|
|
113
|
-
"images" => [
|
|
114
|
-
{
|
|
115
|
-
"height" => nil,
|
|
116
|
-
"url" => "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xfp1/t1.0-1/s320x320/301234_1962753760624_625151598_n.jpg",
|
|
117
|
-
"width" => nil
|
|
118
|
-
}
|
|
119
|
-
],
|
|
120
|
-
"product" => "open",
|
|
121
|
-
"type" => "user",
|
|
122
|
-
"uri" => "spotify:user:1111111111"
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
```
|
|
112
|
+
- Ruby: `>= 3.2` (tested on `3.2`, `3.3`, `3.4`, `4.0`)
|
|
113
|
+
- `omniauth-oauth2`: `>= 1.8`, `< 1.9`
|
|
114
|
+
- Rails integration lanes: `~> 7.1.0`, `~> 7.2.0`, `~> 8.0.0`, `~> 8.1.0`
|
|
126
115
|
|
|
127
|
-
##
|
|
116
|
+
## Release
|
|
128
117
|
|
|
129
|
-
|
|
130
|
-
Enjoy!
|
|
118
|
+
Tag releases as `vX.Y.Z`; GitHub Actions publishes the gem to RubyGems.
|
|
131
119
|
|
|
132
|
-
##
|
|
120
|
+
## License
|
|
133
121
|
|
|
134
|
-
|
|
135
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
136
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
137
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
|
138
|
-
5. Create new Pull Request
|
|
122
|
+
MIT
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
require 'omniauth-oauth2'
|
|
5
|
+
|
|
6
|
+
module OmniAuth
|
|
7
|
+
module Strategies
|
|
8
|
+
# OmniAuth strategy for Spotify OAuth2.
|
|
9
|
+
class Spotify < OmniAuth::Strategies::OAuth2
|
|
10
|
+
option :name, 'spotify'
|
|
11
|
+
|
|
12
|
+
FORCE_APPROVAL_KEY = 'omniauth_spotify_force_approval?'
|
|
13
|
+
LEGACY_FORCE_APPROVAL_KEY = 'ommiauth_spotify_force_approval?'
|
|
14
|
+
|
|
15
|
+
option :client_options,
|
|
16
|
+
site: 'https://api.spotify.com',
|
|
17
|
+
authorize_url: 'https://accounts.spotify.com/authorize',
|
|
18
|
+
token_url: 'https://accounts.spotify.com/api/token',
|
|
19
|
+
connection_opts: {
|
|
20
|
+
headers: {
|
|
21
|
+
user_agent: 'icoretech-omniauth-spotify gem',
|
|
22
|
+
accept: 'application/json',
|
|
23
|
+
content_type: 'application/json'
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
uid { raw_info['id'] }
|
|
28
|
+
|
|
29
|
+
info do
|
|
30
|
+
{
|
|
31
|
+
name: raw_info['display_name'] || raw_info['id'],
|
|
32
|
+
nickname: raw_info['id'],
|
|
33
|
+
email: raw_info['email'],
|
|
34
|
+
urls: raw_info['external_urls'],
|
|
35
|
+
image: image_url,
|
|
36
|
+
birthdate: parse_birthdate(raw_info['birthdate']),
|
|
37
|
+
country_code: raw_info['country'],
|
|
38
|
+
product: raw_info['product'],
|
|
39
|
+
follower_count: raw_info.dig('followers', 'total')
|
|
40
|
+
}.compact
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
extra do
|
|
44
|
+
{
|
|
45
|
+
'raw_info' => raw_info
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def raw_info
|
|
50
|
+
@raw_info ||= access_token.get('v1/me').parsed
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def image_url
|
|
54
|
+
raw_info.fetch('images', []).first&.fetch('url', nil)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def authorize_params
|
|
58
|
+
super.tap do |params|
|
|
59
|
+
params[:show_dialog] = true if force_approval_requested?
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def request_phase
|
|
64
|
+
options[:authorize_params][:show_dialog] = request.params['show_dialog'] if request.params.key?('show_dialog')
|
|
65
|
+
super
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def callback_url
|
|
69
|
+
return '' if @authorization_code_from_signed_request
|
|
70
|
+
|
|
71
|
+
options[:callback_url] || super
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def query_string
|
|
75
|
+
return '' if request.params['code']
|
|
76
|
+
|
|
77
|
+
super
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
private
|
|
81
|
+
|
|
82
|
+
def force_approval_requested?
|
|
83
|
+
session.delete(FORCE_APPROVAL_KEY) ||
|
|
84
|
+
session.delete(LEGACY_FORCE_APPROVAL_KEY) ||
|
|
85
|
+
flash_force_approval?(FORCE_APPROVAL_KEY) ||
|
|
86
|
+
flash_force_approval?(LEGACY_FORCE_APPROVAL_KEY)
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def flash_force_approval?(key)
|
|
90
|
+
flashes = session.dig(:flash, 'flashes') || session.dig('flash', 'flashes')
|
|
91
|
+
!!flashes&.[](key)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def parse_birthdate(value)
|
|
95
|
+
return nil if value.to_s.empty?
|
|
96
|
+
|
|
97
|
+
Date.iso8601(value)
|
|
98
|
+
rescue Date::Error
|
|
99
|
+
nil
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
data/lib/omniauth-spotify.rb
CHANGED
|
@@ -1,91 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
require 'date'
|
|
1
|
+
# frozen_string_literal: true
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
module Strategies
|
|
6
|
-
class Spotify < OmniAuth::Strategies::OAuth2
|
|
7
|
-
# Give your strategy a name.
|
|
8
|
-
option :name, 'spotify'
|
|
9
|
-
|
|
10
|
-
FORCE_APPROVAL_KEY = 'ommiauth_spotify_force_approval?'.freeze
|
|
11
|
-
|
|
12
|
-
# This is where you pass the options you would pass when
|
|
13
|
-
# initializing your consumer from the OAuth gem.
|
|
14
|
-
option :client_options, {
|
|
15
|
-
:site => 'https://api.spotify.com/v1',
|
|
16
|
-
:authorize_url => 'https://accounts.spotify.com/authorize',
|
|
17
|
-
:token_url => 'https://accounts.spotify.com/api/token',
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
# These are called after authentication has succeeded. If
|
|
21
|
-
# possible, you should try to set the UID without making
|
|
22
|
-
# additional calls (if the user id is returned with the token
|
|
23
|
-
# or as a URI parameter). This may not be possible with all
|
|
24
|
-
# providers.
|
|
25
|
-
uid{ raw_info['id'] }
|
|
26
|
-
|
|
27
|
-
info do
|
|
28
|
-
{
|
|
29
|
-
# Unless the 'user-read-private' scope is included, the birthdate, country, image, and product fields may be nil,
|
|
30
|
-
# and the name field will be set to the username/nickname instead of the display name.
|
|
31
|
-
# The email field will be nil if the 'user-read-email' scope isn't included.
|
|
32
|
-
#
|
|
33
|
-
:name => raw_info['display_name'] || raw_info['id'],
|
|
34
|
-
:nickname => raw_info['id'],
|
|
35
|
-
:email => raw_info['email'],
|
|
36
|
-
:urls => raw_info['external_urls'],
|
|
37
|
-
:image => image_url,
|
|
38
|
-
:birthdate => raw_info['birthdate'] && Date.parse(raw_info['birthdate']),
|
|
39
|
-
:country_code => raw_info['country'],
|
|
40
|
-
:product => raw_info['product'],
|
|
41
|
-
:follower_count => raw_info['followers']['total']
|
|
42
|
-
}
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
extra do
|
|
46
|
-
{
|
|
47
|
-
'raw_info' => raw_info
|
|
48
|
-
}
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
def image_url
|
|
52
|
-
if images = raw_info['images']
|
|
53
|
-
if first = images.first
|
|
54
|
-
first['url']
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
def raw_info
|
|
60
|
-
@raw_info ||= access_token.get('me').parsed
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
def authorize_params
|
|
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
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
def callback_url
|
|
82
|
-
if @authorization_code_from_signed_request_in_cookie
|
|
83
|
-
''
|
|
84
|
-
else
|
|
85
|
-
# Fixes regression in omniauth-oauth2 v1.4.0 by https://github.com/intridea/omniauth-oauth2/commit/85fdbe117c2a4400d001a6368cc359d88f40abc7
|
|
86
|
-
options[:callback_url] || (full_host + script_name + callback_path)
|
|
87
|
-
end
|
|
88
|
-
end
|
|
89
|
-
end
|
|
90
|
-
end
|
|
91
|
-
end
|
|
3
|
+
require 'omniauth/spotify'
|
data/omniauth-spotify.gemspec
CHANGED
|
@@ -1,21 +1,34 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
-
require 'omniauth
|
|
5
|
+
require 'omniauth/spotify/version'
|
|
6
|
+
|
|
7
|
+
Gem::Specification.new do |spec|
|
|
8
|
+
spec.name = 'omniauth-spotify'
|
|
9
|
+
spec.version = OmniAuth::Spotify::VERSION
|
|
10
|
+
spec.authors = ['Claudio Poli']
|
|
11
|
+
spec.email = ['masterkain@gmail.com']
|
|
12
|
+
|
|
13
|
+
spec.summary = 'OmniAuth strategy for Spotify OAuth2 authentication.'
|
|
14
|
+
spec.description = 'OAuth2 strategy for OmniAuth that authenticates users with Spotify and exposes account metadata.'
|
|
15
|
+
spec.homepage = 'https://github.com/icoretech/omniauth-spotify'
|
|
16
|
+
spec.license = 'MIT'
|
|
17
|
+
spec.required_ruby_version = '>= 3.2'
|
|
5
18
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
gem.email = ["claudio@icorete.ch\n"]
|
|
11
|
-
gem.description = %q{OmniAuth strategy for Spotify}
|
|
12
|
-
gem.summary = %q{OmniAuth strategy for Spotify}
|
|
13
|
-
gem.homepage = "https://github.com/icoretech/omniauth-spotify"
|
|
19
|
+
spec.metadata['source_code_uri'] = 'https://github.com/icoretech/omniauth-spotify'
|
|
20
|
+
spec.metadata['bug_tracker_uri'] = 'https://github.com/icoretech/omniauth-spotify/issues'
|
|
21
|
+
spec.metadata['changelog_uri'] = 'https://github.com/icoretech/omniauth-spotify/releases'
|
|
22
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
|
14
23
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
24
|
+
spec.files = Dir[
|
|
25
|
+
'lib/**/*.rb',
|
|
26
|
+
'README*',
|
|
27
|
+
'LICENSE*',
|
|
28
|
+
'*.gemspec'
|
|
29
|
+
]
|
|
30
|
+
spec.require_paths = ['lib']
|
|
19
31
|
|
|
20
|
-
|
|
32
|
+
spec.add_dependency 'cgi', '>= 0.3.6'
|
|
33
|
+
spec.add_dependency 'omniauth-oauth2', '>= 1.8', '< 1.9'
|
|
21
34
|
end
|
metadata
CHANGED
|
@@ -1,50 +1,72 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-spotify
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Claudio Poli
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: cgi
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: 0.3.6
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: 0.3.6
|
|
13
26
|
- !ruby/object:Gem::Dependency
|
|
14
27
|
name: omniauth-oauth2
|
|
15
28
|
requirement: !ruby/object:Gem::Requirement
|
|
16
29
|
requirements:
|
|
17
|
-
- - "
|
|
30
|
+
- - ">="
|
|
18
31
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '1.
|
|
32
|
+
version: '1.8'
|
|
33
|
+
- - "<"
|
|
34
|
+
- !ruby/object:Gem::Version
|
|
35
|
+
version: '1.9'
|
|
20
36
|
type: :runtime
|
|
21
37
|
prerelease: false
|
|
22
38
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
39
|
requirements:
|
|
24
|
-
- - "
|
|
40
|
+
- - ">="
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
version: '1.8'
|
|
43
|
+
- - "<"
|
|
25
44
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '1.
|
|
27
|
-
description:
|
|
45
|
+
version: '1.9'
|
|
46
|
+
description: OAuth2 strategy for OmniAuth that authenticates users with Spotify and
|
|
47
|
+
exposes account metadata.
|
|
28
48
|
email:
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
'
|
|
49
|
+
- masterkain@gmail.com
|
|
32
50
|
executables: []
|
|
33
51
|
extensions: []
|
|
34
52
|
extra_rdoc_files: []
|
|
35
53
|
files:
|
|
36
|
-
- ".gitignore"
|
|
37
|
-
- Gemfile
|
|
38
54
|
- LICENSE.txt
|
|
39
55
|
- README.md
|
|
40
|
-
- Rakefile
|
|
41
56
|
- lib/omniauth-spotify.rb
|
|
42
57
|
- lib/omniauth-spotify/version.rb
|
|
58
|
+
- lib/omniauth/spotify.rb
|
|
59
|
+
- lib/omniauth/spotify/version.rb
|
|
60
|
+
- lib/omniauth/strategies/spotify.rb
|
|
43
61
|
- omniauth-spotify.gemspec
|
|
44
62
|
homepage: https://github.com/icoretech/omniauth-spotify
|
|
45
|
-
licenses:
|
|
46
|
-
|
|
47
|
-
|
|
63
|
+
licenses:
|
|
64
|
+
- MIT
|
|
65
|
+
metadata:
|
|
66
|
+
source_code_uri: https://github.com/icoretech/omniauth-spotify
|
|
67
|
+
bug_tracker_uri: https://github.com/icoretech/omniauth-spotify/issues
|
|
68
|
+
changelog_uri: https://github.com/icoretech/omniauth-spotify/releases
|
|
69
|
+
rubygems_mfa_required: 'true'
|
|
48
70
|
rdoc_options: []
|
|
49
71
|
require_paths:
|
|
50
72
|
- lib
|
|
@@ -52,16 +74,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
52
74
|
requirements:
|
|
53
75
|
- - ">="
|
|
54
76
|
- !ruby/object:Gem::Version
|
|
55
|
-
version: '
|
|
77
|
+
version: '3.2'
|
|
56
78
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
57
79
|
requirements:
|
|
58
80
|
- - ">="
|
|
59
81
|
- !ruby/object:Gem::Version
|
|
60
82
|
version: '0'
|
|
61
83
|
requirements: []
|
|
62
|
-
|
|
63
|
-
rubygems_version: 2.6.11
|
|
64
|
-
signing_key:
|
|
84
|
+
rubygems_version: 3.6.9
|
|
65
85
|
specification_version: 4
|
|
66
|
-
summary: OmniAuth strategy for Spotify
|
|
86
|
+
summary: OmniAuth strategy for Spotify OAuth2 authentication.
|
|
67
87
|
test_files: []
|
data/.gitignore
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require "bundler/gem_tasks"
|