omniauth-apple 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rspec.yml +11 -10
- data/CHANGELOG.md +13 -1
- data/lib/omniauth/apple/version.rb +1 -1
- data/lib/omniauth/strategies/apple.rb +15 -1
- data/omniauth-apple.gemspec +2 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: feebd01d5717de66bfd00f8587459642d203ca2ffaf0b2057c5cd002993d3531
|
4
|
+
data.tar.gz: 2febe43a836eb2232c011b7f87996bbc837ce56f94ebe03f8eb57378ead44530
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c91f969f3e89c2bfd272d8c8df82287b964d3bb636c8dde97b037edb3b6030e415e79715ff940175c0c807a518c1279470fbe73b69a6bb752acb84774db358b
|
7
|
+
data.tar.gz: 619709528b5b0e683ea0f9938268a9443cb273788dea3ae98f557cf828d539b35dd898c7c73efcfb04115944f003bfd29702916403a40d3e715ef8fb5c53fbe6
|
data/.github/workflows/rspec.yml
CHANGED
@@ -6,21 +6,22 @@ on:
|
|
6
6
|
- master
|
7
7
|
pull_request:
|
8
8
|
|
9
|
+
permissions:
|
10
|
+
contents: read
|
11
|
+
|
9
12
|
jobs:
|
10
|
-
|
13
|
+
spec:
|
11
14
|
runs-on: ubuntu-latest
|
12
15
|
strategy:
|
13
16
|
fail-fast: false
|
14
17
|
matrix:
|
15
|
-
ruby: ['2.
|
18
|
+
ruby: ['2.6', '2.7', '3.0', '3.1']
|
16
19
|
steps:
|
17
|
-
- uses: actions/checkout@
|
18
|
-
- name: Set up Ruby
|
19
|
-
uses:
|
20
|
+
- uses: actions/checkout@v3
|
21
|
+
- name: Set up Ruby
|
22
|
+
uses: ruby/setup-ruby@v1
|
20
23
|
with:
|
21
24
|
ruby-version: ${{ matrix.ruby }}
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
bundle install --jobs 4 --retry 3
|
26
|
-
bundle exec rake spec
|
25
|
+
bundler-cache: true
|
26
|
+
- name: Run Specs
|
27
|
+
run: bundle exec rake spec
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [1.1.0] - 2022-09-26
|
4
|
+
|
5
|
+
### Added
|
6
|
+
|
7
|
+
- [#67](https://github.com/nhosoya/omniauth-apple/pull/67) Add email_verified and is_private_email
|
8
|
+
|
9
|
+
### Fixed
|
10
|
+
|
11
|
+
- [#74](https://github.com/nhosoya/omniauth-apple/pull/74) rspec failure - callback_path null pointer
|
12
|
+
- [#81](https://github.com/nhosoya/omniauth-apple/pull/81) Allow for omniauth 2.0 series
|
13
|
+
- [#88](https://github.com/nhosoya/omniauth-apple/pull/88) update github actions config
|
14
|
+
|
3
15
|
## [1.0.2] - 2021-05-19
|
4
16
|
|
5
17
|
### Fixed
|
@@ -33,7 +45,7 @@
|
|
33
45
|
|
34
46
|
### Changed
|
35
47
|
|
36
|
-
- [#27](https://github.com/nhosoya/omniauth-apple/pull/27) Update development dependency
|
48
|
+
- [#27](https://github.com/nhosoya/omniauth-apple/pull/27) Update development dependency
|
37
49
|
- [#28](https://github.com/nhosoya/omniauth-apple/pull/28) Update README.md
|
38
50
|
- [#38](https://github.com/nhosoya/omniauth-apple/pull/38) Refine AuthHash
|
39
51
|
- [#39](https://github.com/nhosoya/omniauth-apple/pull/39) Set the default scope to 'email name'
|
@@ -19,6 +19,8 @@ module OmniAuth
|
|
19
19
|
|
20
20
|
uid { id_info['sub'] }
|
21
21
|
|
22
|
+
# Documentation on parameters
|
23
|
+
# https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_rest_api/authenticating_users_with_sign_in_with_apple
|
22
24
|
info do
|
23
25
|
prune!(
|
24
26
|
sub: id_info['sub'],
|
@@ -26,6 +28,8 @@ module OmniAuth
|
|
26
28
|
first_name: first_name,
|
27
29
|
last_name: last_name,
|
28
30
|
name: (first_name || last_name) ? [first_name, last_name].join(' ') : email,
|
31
|
+
email_verified: email_verified,
|
32
|
+
is_private_email: is_private_email
|
29
33
|
)
|
30
34
|
end
|
31
35
|
|
@@ -38,12 +42,22 @@ module OmniAuth
|
|
38
42
|
::OAuth2::Client.new(client_id, client_secret, deep_symbolize(options.client_options))
|
39
43
|
end
|
40
44
|
|
45
|
+
def email_verified
|
46
|
+
value = id_info['email_verified']
|
47
|
+
value == true || value == "true"
|
48
|
+
end
|
49
|
+
|
50
|
+
def is_private_email
|
51
|
+
value = id_info['is_private_email']
|
52
|
+
value == true || value == "true"
|
53
|
+
end
|
54
|
+
|
41
55
|
def authorize_params
|
42
56
|
super.merge(nonce: new_nonce)
|
43
57
|
end
|
44
58
|
|
45
59
|
def callback_url
|
46
|
-
options[:redirect_uri] || (full_host +
|
60
|
+
options[:redirect_uri] || (full_host + callback_path)
|
47
61
|
end
|
48
62
|
|
49
63
|
private
|
data/omniauth-apple.gemspec
CHANGED
@@ -38,9 +38,10 @@ Gem::Specification.new do |spec|
|
|
38
38
|
|
39
39
|
spec.add_dependency 'omniauth-oauth2'
|
40
40
|
spec.add_dependency 'jwt'
|
41
|
+
spec.add_dependency 'rack-protection', '~> 2.0'
|
41
42
|
spec.add_development_dependency "bundler", "~> 2.0"
|
42
43
|
spec.add_development_dependency "rake", "~> 13.0"
|
43
44
|
spec.add_development_dependency "rspec", "~> 3.9"
|
44
45
|
spec.add_development_dependency "webmock", "~> 3.8"
|
45
|
-
spec.add_development_dependency
|
46
|
+
spec.add_development_dependency "simplecov", "~> 0.18"
|
46
47
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-apple
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nhosoya
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-09-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omniauth-oauth2
|
@@ -39,6 +39,20 @@ dependencies:
|
|
39
39
|
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: rack-protection
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '2.0'
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '2.0'
|
42
56
|
- !ruby/object:Gem::Dependency
|
43
57
|
name: bundler
|
44
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
164
|
- !ruby/object:Gem::Version
|
151
165
|
version: '0'
|
152
166
|
requirements: []
|
153
|
-
rubygems_version: 3.
|
167
|
+
rubygems_version: 3.3.7
|
154
168
|
signing_key:
|
155
169
|
specification_version: 4
|
156
170
|
summary: OmniAuth strategy for Sign In with Apple
|