sb-omniauth-kakao 0.3.1 → 0.3.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8e9054233ada5487a63575ebc5d56602ac1e3c1aa607d7467440fb99468097d
4
- data.tar.gz: bc009ee3f3dc2c1090a415523a289552f9b32a46fa939984b3349a8fc49d06d6
3
+ metadata.gz: ce5f19c8e369c656d00d34f2e0a0c5d7ac7c7ebce3e4b2d11136987bfb26a4e7
4
+ data.tar.gz: e61465d55af1e3c32c90911da59cc12b87320a535ebde1b03db1f11f9a7946d2
5
5
  SHA512:
6
- metadata.gz: f1e29f3b12e4ac68bac7d3428f41d8c5487cca8376ab4b04a13cc0c719b6015032390463cfad1752055a1482123347133b76eb0740f6970e3256dbbf6cf8bcb4
7
- data.tar.gz: 6caab170e2fcc2c0f2521551d3ff7ed18a2f11470e438a5697d56d6b5b2117eda79715ed9d7c450c3aa592ca5663624cc4bcb13d332b033e47c3639f7f99206d
6
+ metadata.gz: d55ef06a15945d01a8667031be7dd9ef170cf15f027e859a1bede4de621093afe96b06a43762abdd4f9edf6c9f39f1985d92629197e5446dc0dbbc3cce91e0ba
7
+ data.tar.gz: 4b76018e0804d178c186f64a8d78823f543f6a2e73366c24a2b92b40c72855afb1b6fa95205e3631eda5987878b117225e8f327d9a37a71743872ada2df52b6b
data/README.md CHANGED
@@ -14,13 +14,13 @@ gem 'sb-omniauth-kakao', git: git@github.com:ScriptonBasestar/sb-omniauth-kakao.
14
14
 
15
15
  or
16
16
 
17
- gem "sb-omniauth-kakao", "0.3.0", source: "https://rubygems.pkg.github.com/scriptonbasestar"
17
+ gem "sb-omniauth-kakao", "0.3.3", source: "https://rubygems.pkg.github.com/scriptonbasestar"
18
18
 
19
19
  or
20
20
 
21
21
  # https://github.com/ScriptonBasestar/sb-omniauth-kakao/pkgs/rubygems/sb-omniauth-kakao
22
22
  source "https://rubygems.pkg.github.com/scriptonbasestar" do
23
- gem "sb-omniauth-kakao", "0.3.0"
23
+ gem "sb-omniauth-kakao", "0.3.3"
24
24
  end
25
25
  ```
26
26
 
@@ -39,6 +39,9 @@ Rails.application.config.middleware.use OmniAuth::Builder do
39
39
  provider :kakao, ENV['KAKAO_CLIENT_ID']
40
40
  provider :kakao, ENV['KAKAO_CLIENT_ID'], ENV['KAKAO_CLIENT_SECRET']
41
41
  provider :kakao, ENV['KAKAO_CLIENT_ID'], {:redirect_path => ENV['REDIRECT_PATH']}
42
+ provider :kakao, ENV['KAKAO_CLIENT_ID'], {:redirect_path => ENV['REDIRECT_PATH']}
43
+ provider :kakao, ENV['KAKAO_CLIENT_ID'], ENV['KAKAO_CLIENT_SECRET'], {redirect_url: ENV['REDIRECT_URL'], scope: ENV['KAKAO_SCOPE']}
44
+ provider :kakao, ENV['KAKAO_CLIENT_ID'], ENV['KAKAO_CLIENT_SECRET'], {redirect_url: ENV['REDIRECT_URL'], scope: 'profile_nickname,profile_image,account_email'}
42
45
  end
43
46
  ```
44
47
 
@@ -87,6 +90,8 @@ Here's an example *Auth Hash* available in `request.env['omniauth.auth']`:
87
90
  :uid => '123456789',
88
91
  :info => {
89
92
  :name => 'Hong Gil-Dong',
93
+ :username => nil,
94
+ :email => nil,
90
95
  :image => 'http://xxx.kakao.com/.../aaa.jpg',
91
96
  },
92
97
  :credentials => {
@@ -107,3 +112,10 @@ Here's an example *Auth Hash* available in `request.env['omniauth.auth']`:
107
112
 
108
113
  ## Contributors
109
114
  Issue or Fork PR
115
+
116
+ name: raw_info["properties"]["nickname"],
117
+ username: raw_info["kakao_account"]["email"],
118
+ image: raw_info["properties"]["thumbnail_image"]
119
+ }
120
+ if raw_info["kakao_account"]["has_email"] && raw_info["kakao_account"]["is_email_verified"] && raw_info["kakao_account"]["is_email_valid"]
121
+ hash[:email] = raw_info["kakao_account"]["email"]
data/example/.env.sample CHANGED
@@ -1,7 +1,7 @@
1
1
  KAKAO_CLIENT_ID=your_kakao_client_id
2
2
  KAKAO_CLIENT_SECRET=your_kakao_client_secret
3
- KAKAO_CLIENT_SCOPE=profile,account_email
4
- KAKAO_REDIRECT_URL=http://localhost:3000/auth/kakao/callback
3
+ KAKAO_CLIENT_SCOPE=profile_nickname,profile_image,account_email
4
+ KAKAO_REDIRECT_URL=http://localhost:8080/auth/kakao/callback
5
5
 
6
6
  GOOGLE_CLIENT_ID=your_google_client_id
7
7
  GOOGLE_CLIENT_SECRET=your_google_client_secret
data/example/config.ru CHANGED
@@ -60,7 +60,7 @@ class App < Sinatra::Base
60
60
  # end
61
61
  # }
62
62
  provider :kakao, ENV.fetch("KAKAO_CLIENT_ID", nil), ENV.fetch("KAKAO_CLIENT_SECRET", nil),
63
- scope: ENV.fetch("KAKAO_CLIENT_SCOPE", "profile"), redirect_url: ENV.fetch("KAKAO_REDIRECT_URL") do |builder|
63
+ scope: ENV.fetch("KAKAO_CLIENT_SCOPE", "profile_nickname,profile_image"), redirect_url: ENV.fetch("KAKAO_REDIRECT_URL") do |builder|
64
64
  builder.client_options.connection_build do |conn|
65
65
  conn.request :url_encoded
66
66
  conn.response :logger, $logger, { headers: true, bodies: { request: false, response: true }, errors: true }
@@ -5,7 +5,7 @@ require "omniauth-oauth2"
5
5
  module OmniAuth
6
6
  module Strategies
7
7
  class Kakao < OmniAuth::Strategies::OAuth2
8
- DEFAULT_SCOPE = "account_email,profile".freeze
8
+ DEFAULT_SCOPE = "profile_nickname,profile_image".freeze
9
9
 
10
10
  BASE_URL = "https://kauth.kakao.com".freeze
11
11
  AUTHORIZE_URL = "/oauth/authorize".freeze
@@ -49,7 +49,7 @@ module OmniAuth
49
49
  end
50
50
 
51
51
  def callback_url
52
- options.redirect_url || (full_host + callback_path)
52
+ options.redirect_url || (full_host + callback_path)
53
53
  end
54
54
 
55
55
  # def authorize_params
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Kakao
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.3"
4
4
  end
5
5
  end
@@ -21,13 +21,13 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
22
22
  spec.require_paths = ["lib"]
23
23
 
24
- spec.add_dependency 'omniauth', '~> 1.9'
25
- spec.add_dependency 'omniauth-oauth2', '~> 1.7'
24
+ spec.add_dependency 'omniauth', '~> 2.1'
25
+ spec.add_dependency 'omniauth-oauth2', '~> 1.8'
26
26
 
27
- spec.add_development_dependency "bundler", "~> 2.6"
28
- spec.add_development_dependency "rake", "~> 13.0"
27
+ spec.add_development_dependency 'bundler', '~> 2.6'
28
+ spec.add_development_dependency 'rake', '~> 13.2'
29
29
  spec.add_development_dependency 'rspec', '~> 3.13'
30
30
  spec.add_development_dependency 'guard-rspec', '~> 4.7'
31
31
  spec.add_development_dependency 'fakeweb', '~> 1.3'
32
- spec.add_development_dependency "minitest", "~> 5.25"
32
+ spec.add_development_dependency 'minitest', '~> 5.25'
33
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sb-omniauth-kakao
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - archmagece
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-22 00:00:00.000000000 Z
11
+ date: 2025-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.9'
19
+ version: '2.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.9'
26
+ version: '2.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: omniauth-oauth2
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.7'
33
+ version: '1.8'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.7'
40
+ version: '1.8'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '13.0'
61
+ version: '13.2'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '13.0'
68
+ version: '13.2'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement