omniauth-naver-oauth2 1.0.0
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 +7 -0
- data/.rubocop.yml +8 -0
- data/.vscode/tasks.json +13 -0
- data/CHANGELOG.md +22 -0
- data/CODE_OF_CONDUCT.md +132 -0
- data/LICENSE.txt +21 -0
- data/README.md +68 -0
- data/Rakefile +12 -0
- data/examples/rails_integration.rb +86 -0
- data/lib/omniauth/naver/oauth2/version.rb +9 -0
- data/lib/omniauth/naver/oauth2.rb +12 -0
- data/lib/omniauth/strategies/naver_oauth2.rb +81 -0
- data/lib/omniauth-naver-oauth2.rb +12 -0
- data/sig/omniauth/naver/oauth2.rbs +8 -0
- metadata +142 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 5988ca4f5682fd21412569391012c86db939345e7381abc63778319888ffb1b0
|
|
4
|
+
data.tar.gz: 5006fb708013581c4eaa39ecff14b2dfec07aa265910ed3cb0bb29c60a7ffa0d
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 66728cd6df8bc18c26db47908fccaa0615b0211192d03d8b0ddcc993e1d2d14452c6b2eacf1d2064c0ccd15878b3149f0c8cd3e2136e79f15cdcb4d9c6eb0f3d
|
|
7
|
+
data.tar.gz: 85393b5ae92773333b1bda8b6634ffacb1f8721f7854adf5e6faa60cdd8c3ff7a1e202799d2503129a6b5e1b787914e651dd40d6b19fdf52f56de437af4764b3
|
data/.rubocop.yml
ADDED
data/.vscode/tasks.json
ADDED
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
## [Unreleased]
|
|
2
|
+
|
|
3
|
+
## [1.0.0] - 2025-08-05
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- Initial release of omniauth-naver-oauth2
|
|
7
|
+
- Modern OmniAuth OAuth2 strategy for Naver authentication
|
|
8
|
+
- Customizable scope support (profile, email)
|
|
9
|
+
- Comprehensive user information extraction
|
|
10
|
+
- Gender normalization and image URL cleaning
|
|
11
|
+
- Bilingual documentation (Korean/English)
|
|
12
|
+
- Ruby 3.1+ support
|
|
13
|
+
- Full test coverage with CI/CD pipeline
|
|
14
|
+
- Rails integration examples
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
- Standard OmniAuth provider syntax: `provider :naver, client_id, client_secret, options`
|
|
18
|
+
- Scope customization: Choose specific user data to request
|
|
19
|
+
- Clean image URLs: Removes size parameters for higher quality images
|
|
20
|
+
- Gender normalization: Converts 'M'/'F' to 'male'/'female'
|
|
21
|
+
- Comprehensive user info: name, email, nickname, image, gender, age, birthday, birthyear
|
|
22
|
+
- Modern Ruby and Rails compatibility
|
data/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the overall
|
|
26
|
+
community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
|
+
any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email address,
|
|
35
|
+
without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official email address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement at
|
|
63
|
+
[INSERT CONTACT METHOD].
|
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
+
|
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
+
reporter of any incident.
|
|
68
|
+
|
|
69
|
+
## Enforcement Guidelines
|
|
70
|
+
|
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
+
|
|
74
|
+
### 1. Correction
|
|
75
|
+
|
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
+
unprofessional or unwelcome in the community.
|
|
78
|
+
|
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
|
82
|
+
|
|
83
|
+
### 2. Warning
|
|
84
|
+
|
|
85
|
+
**Community Impact**: A violation through a single incident or series of
|
|
86
|
+
actions.
|
|
87
|
+
|
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
|
93
|
+
ban.
|
|
94
|
+
|
|
95
|
+
### 3. Temporary Ban
|
|
96
|
+
|
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
|
98
|
+
sustained inappropriate behavior.
|
|
99
|
+
|
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
+
communication with the community for a specified period of time. No public or
|
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
+
Violating these terms may lead to a permanent ban.
|
|
105
|
+
|
|
106
|
+
### 4. Permanent Ban
|
|
107
|
+
|
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
+
|
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
113
|
+
community.
|
|
114
|
+
|
|
115
|
+
## Attribution
|
|
116
|
+
|
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
+
version 2.1, available at
|
|
119
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
120
|
+
|
|
121
|
+
Community Impact Guidelines were inspired by
|
|
122
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
123
|
+
|
|
124
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
125
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
126
|
+
[https://www.contributor-covenant.org/translations][translations].
|
|
127
|
+
|
|
128
|
+
[homepage]: https://www.contributor-covenant.org
|
|
129
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
130
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
131
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
132
|
+
[translations]: https://www.contributor-covenant.org/translations
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 GoCoder
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# OmniAuth Naver OAuth2
|
|
2
|
+
|
|
3
|
+
네이버 인증을 위한 현대적인 OmniAuth OAuth2 strategy를 제공하는 Ruby gem입니다. 기존 omniauth-naver와 달리 스코프 설정이 가능하고 최신 OAuth2 표준을 따릅니다.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## 설치
|
|
7
|
+
```shell
|
|
8
|
+
gem install omniauth-naver-oauth2
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 사용법
|
|
12
|
+
|
|
13
|
+
### Rails 설정
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
# config/initializers/omniauth.rb
|
|
17
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
|
18
|
+
# 기본
|
|
19
|
+
provider :naver, ENV['NAVER_CLIENT_ID'], ENV['NAVER_CLIENT_SECRET']
|
|
20
|
+
|
|
21
|
+
# + Options
|
|
22
|
+
provider :naver, ENV['NAVER_CLIENT_ID'], ENV['NAVER_CLIENT_SECRET'], {
|
|
23
|
+
scope: 'profile,email',
|
|
24
|
+
redirect_url: 'http://localhost:3000/auth/naver/callback'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### 인증 해시
|
|
32
|
+
|
|
33
|
+
```ruby
|
|
34
|
+
# request.env['omniauth.auth']
|
|
35
|
+
{
|
|
36
|
+
provider: 'naver',
|
|
37
|
+
uid: '48436401',
|
|
38
|
+
info: {
|
|
39
|
+
name: '홍길동',
|
|
40
|
+
email: 'example@naver.com',
|
|
41
|
+
nickname: '길동',
|
|
42
|
+
image: 'https://phinf.pstatic.net/contactthumb/52/2014/8/4/example.jpg',
|
|
43
|
+
gender: 'male', # 'male', 'female', or nil
|
|
44
|
+
age: '30-39',
|
|
45
|
+
birthday: '01-08',
|
|
46
|
+
birthyear: '1990'
|
|
47
|
+
},
|
|
48
|
+
credentials: {
|
|
49
|
+
token: 'ACCESS_TOKEN',
|
|
50
|
+
expires_at: 1234567890,
|
|
51
|
+
expires: true
|
|
52
|
+
},
|
|
53
|
+
extra: {
|
|
54
|
+
raw_info: { ... },
|
|
55
|
+
response: { ... }
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
## Contribute
|
|
62
|
+
|
|
63
|
+
버그 신고와 PR은 https://github.com/GoCoder7/omniauth-naver-oauth2 로 부탁드립니다.
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## License
|
|
67
|
+
|
|
68
|
+
[MIT](https://opensource.org/licenses/MIT)
|
data/Rakefile
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Rails Integration Example for omniauth-naver-oauth2
|
|
2
|
+
# Rails에서 omniauth-naver-oauth2 사용 예제
|
|
3
|
+
|
|
4
|
+
# Gemfile에 추가 | Add to Gemfile
|
|
5
|
+
# gem 'omniauth-naver-oauth2'
|
|
6
|
+
# gem 'omniauth-rails_csrf_protection'
|
|
7
|
+
|
|
8
|
+
# config/initializers/omniauth.rb
|
|
9
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
|
10
|
+
# 기본 사용법 | Basic usage
|
|
11
|
+
provider :naver, ENV['NAVER_CLIENT_ID'], ENV['NAVER_CLIENT_SECRET']
|
|
12
|
+
|
|
13
|
+
# 스코프 설정 | With custom scopes
|
|
14
|
+
provider :naver, ENV['NAVER_CLIENT_ID'], ENV['NAVER_CLIENT_SECRET'], {
|
|
15
|
+
scope: 'profile,email'
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
# 옵션과 함께 사용 | With options
|
|
19
|
+
provider :naver, ENV['NAVER_CLIENT_ID'], ENV['NAVER_CLIENT_SECRET'], {
|
|
20
|
+
scope: 'profile,email',
|
|
21
|
+
redirect_url: 'http://localhost:3000/auth/naver/callback'
|
|
22
|
+
}
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# config/routes.rb
|
|
26
|
+
Rails.application.routes.draw do
|
|
27
|
+
get '/auth/naver/callback', to: 'sessions#omniauth'
|
|
28
|
+
# 기타 라우트들...
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# app/controllers/sessions_controller.rb
|
|
32
|
+
class SessionsController < ApplicationController
|
|
33
|
+
def omniauth
|
|
34
|
+
auth = request.env['omniauth.auth']
|
|
35
|
+
|
|
36
|
+
# 사용자 찾기 또는 생성 | Find or create user
|
|
37
|
+
user = User.find_or_create_by(uid: auth.uid, provider: auth.provider) do |u|
|
|
38
|
+
u.name = auth.info.name
|
|
39
|
+
u.email = auth.info.email
|
|
40
|
+
u.nickname = auth.info.nickname
|
|
41
|
+
u.image = auth.info.image
|
|
42
|
+
u.gender = auth.info.gender
|
|
43
|
+
u.age = auth.info.age
|
|
44
|
+
u.birthday = auth.info.birthday
|
|
45
|
+
u.birthyear = auth.info.birthyear
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
if user.persisted?
|
|
49
|
+
session[:user_id] = user.id
|
|
50
|
+
redirect_to root_path, notice: '네이버 로그인이 완료되었습니다!'
|
|
51
|
+
else
|
|
52
|
+
redirect_to login_path, alert: '로그인 중 오류가 발생했습니다.'
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# app/models/user.rb
|
|
58
|
+
class User < ApplicationRecord
|
|
59
|
+
validates :uid, presence: true
|
|
60
|
+
validates :provider, presence: true
|
|
61
|
+
validates :email, presence: true, uniqueness: true
|
|
62
|
+
|
|
63
|
+
def self.from_naver_omniauth(auth)
|
|
64
|
+
where(uid: auth.uid, provider: auth.provider).first_or_create! do |user|
|
|
65
|
+
user.name = auth.info.name
|
|
66
|
+
user.email = auth.info.email
|
|
67
|
+
user.nickname = auth.info.nickname
|
|
68
|
+
user.image = auth.info.image
|
|
69
|
+
user.gender = auth.info.gender
|
|
70
|
+
user.age = auth.info.age
|
|
71
|
+
user.birthday = auth.info.birthday
|
|
72
|
+
user.birthyear = auth.info.birthyear
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# 마이그레이션 예제 | Migration example
|
|
78
|
+
# rails generate migration CreateUsers uid:string provider:string name:string email:string nickname:string image:string gender:string age:string birthday:string birthyear:string
|
|
79
|
+
# rails db:migrate
|
|
80
|
+
|
|
81
|
+
# 환경 변수 설정 예제 (.env 파일)
|
|
82
|
+
# NAVER_CLIENT_ID=your_naver_client_id
|
|
83
|
+
# NAVER_CLIENT_SECRET=your_naver_client_secret
|
|
84
|
+
|
|
85
|
+
# 뷰 예제 | View example
|
|
86
|
+
# <%= link_to "네이버로 로그인", "/auth/naver", method: :post, class: "btn btn-success" %>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "omniauth-oauth2"
|
|
4
|
+
|
|
5
|
+
module OmniAuth
|
|
6
|
+
module Strategies
|
|
7
|
+
# OmniAuth OAuth2 strategy for Naver authentication
|
|
8
|
+
# This strategy supports customizable scopes and modern OAuth2 practices
|
|
9
|
+
class NaverOauth2 < OmniAuth::Strategies::OAuth2
|
|
10
|
+
option :name, :naver
|
|
11
|
+
|
|
12
|
+
option :client_options,
|
|
13
|
+
site: "https://nid.naver.com",
|
|
14
|
+
authorize_url: "/oauth2.0/authorize",
|
|
15
|
+
token_url: "/oauth2.0/token"
|
|
16
|
+
|
|
17
|
+
option :scope, "profile"
|
|
18
|
+
|
|
19
|
+
# User ID from Naver
|
|
20
|
+
uid { raw_info["response"]["id"].to_s }
|
|
21
|
+
|
|
22
|
+
# User information mapping
|
|
23
|
+
info do
|
|
24
|
+
response = raw_info["response"] || {}
|
|
25
|
+
{
|
|
26
|
+
name: response["name"],
|
|
27
|
+
email: response["email"],
|
|
28
|
+
nickname: response["nickname"],
|
|
29
|
+
image: clean_image_url(response["profile_image"]),
|
|
30
|
+
gender: normalize_gender(response["gender"]),
|
|
31
|
+
age: response["age"],
|
|
32
|
+
birthday: response["birthday"],
|
|
33
|
+
birthyear: response["birthyear"]
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Extra information
|
|
38
|
+
extra do
|
|
39
|
+
{
|
|
40
|
+
raw_info: raw_info,
|
|
41
|
+
response: raw_info["response"]
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
private
|
|
46
|
+
|
|
47
|
+
# Get user information from Naver API
|
|
48
|
+
def raw_info
|
|
49
|
+
@raw_info ||= access_token.get("https://openapi.naver.com/v1/nid/me").parsed
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Clean up image URL by removing size parameters for higher quality
|
|
53
|
+
def clean_image_url(image_url)
|
|
54
|
+
return nil if image_url.nil? || image_url.include?("nodata_33x33.gif")
|
|
55
|
+
|
|
56
|
+
# Remove type parameter to get original size image
|
|
57
|
+
image_url.sub(/\?type=\w+/, "")
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Normalize gender format from Naver API
|
|
61
|
+
def normalize_gender(gender)
|
|
62
|
+
case gender
|
|
63
|
+
when "M"
|
|
64
|
+
"male"
|
|
65
|
+
when "F"
|
|
66
|
+
"female"
|
|
67
|
+
else
|
|
68
|
+
gender
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Callback URL for OAuth flow
|
|
73
|
+
def callback_url
|
|
74
|
+
options.redirect_url || (full_host + callback_path)
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Register the strategy with OmniAuth
|
|
81
|
+
OmniAuth.config.add_camelization "naver", "NaverOauth2"
|
metadata
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: omniauth-naver-oauth2
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- GoCoder
|
|
8
|
+
bindir: exe
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: omniauth
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '2.1'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '2.1'
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: omniauth-oauth2
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - "~>"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '1.8'
|
|
33
|
+
type: :runtime
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - "~>"
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '1.8'
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: bundler
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '2.0'
|
|
47
|
+
type: :development
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - "~>"
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '2.0'
|
|
54
|
+
- !ruby/object:Gem::Dependency
|
|
55
|
+
name: rake
|
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
|
57
|
+
requirements:
|
|
58
|
+
- - "~>"
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: '13.0'
|
|
61
|
+
type: :development
|
|
62
|
+
prerelease: false
|
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
65
|
+
- - "~>"
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: '13.0'
|
|
68
|
+
- !ruby/object:Gem::Dependency
|
|
69
|
+
name: minitest
|
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
- - "~>"
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: '5.0'
|
|
75
|
+
type: :development
|
|
76
|
+
prerelease: false
|
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
78
|
+
requirements:
|
|
79
|
+
- - "~>"
|
|
80
|
+
- !ruby/object:Gem::Version
|
|
81
|
+
version: '5.0'
|
|
82
|
+
- !ruby/object:Gem::Dependency
|
|
83
|
+
name: rubocop
|
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
|
85
|
+
requirements:
|
|
86
|
+
- - "~>"
|
|
87
|
+
- !ruby/object:Gem::Version
|
|
88
|
+
version: '1.21'
|
|
89
|
+
type: :development
|
|
90
|
+
prerelease: false
|
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
92
|
+
requirements:
|
|
93
|
+
- - "~>"
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: '1.21'
|
|
96
|
+
description: A Ruby gem providing OmniAuth OAuth2 strategy for Naver authentication.
|
|
97
|
+
Supports modern OAuth2 practices with customizable scopes and proper error handling.
|
|
98
|
+
email:
|
|
99
|
+
- gocoder7@gmail.com
|
|
100
|
+
executables: []
|
|
101
|
+
extensions: []
|
|
102
|
+
extra_rdoc_files: []
|
|
103
|
+
files:
|
|
104
|
+
- ".rubocop.yml"
|
|
105
|
+
- ".vscode/tasks.json"
|
|
106
|
+
- CHANGELOG.md
|
|
107
|
+
- CODE_OF_CONDUCT.md
|
|
108
|
+
- LICENSE.txt
|
|
109
|
+
- README.md
|
|
110
|
+
- Rakefile
|
|
111
|
+
- examples/rails_integration.rb
|
|
112
|
+
- lib/omniauth-naver-oauth2.rb
|
|
113
|
+
- lib/omniauth/naver/oauth2.rb
|
|
114
|
+
- lib/omniauth/naver/oauth2/version.rb
|
|
115
|
+
- lib/omniauth/strategies/naver_oauth2.rb
|
|
116
|
+
- sig/omniauth/naver/oauth2.rbs
|
|
117
|
+
homepage: https://github.com/GoCoder7/omniauth-naver-oauth2
|
|
118
|
+
licenses:
|
|
119
|
+
- MIT
|
|
120
|
+
metadata:
|
|
121
|
+
allowed_push_host: https://rubygems.org
|
|
122
|
+
homepage_uri: https://github.com/GoCoder7/omniauth-naver-oauth2
|
|
123
|
+
source_code_uri: https://github.com/GoCoder7/omniauth-naver-oauth2
|
|
124
|
+
changelog_uri: https://github.com/GoCoder7/omniauth-naver-oauth2/blob/main/CHANGELOG.md
|
|
125
|
+
rdoc_options: []
|
|
126
|
+
require_paths:
|
|
127
|
+
- lib
|
|
128
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
129
|
+
requirements:
|
|
130
|
+
- - ">="
|
|
131
|
+
- !ruby/object:Gem::Version
|
|
132
|
+
version: 3.1.0
|
|
133
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
|
+
requirements:
|
|
135
|
+
- - ">="
|
|
136
|
+
- !ruby/object:Gem::Version
|
|
137
|
+
version: '0'
|
|
138
|
+
requirements: []
|
|
139
|
+
rubygems_version: 3.6.9
|
|
140
|
+
specification_version: 4
|
|
141
|
+
summary: OmniAuth OAuth2 strategy for Naver with proper scope handling
|
|
142
|
+
test_files: []
|