Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/kakao login #16

Merged
merged 7 commits into from
Apr 28, 2022
Merged

feature/kakao login #16

merged 7 commits into from
Apr 28, 2022

Conversation

ErranderLee
Copy link
Contributor

@ErranderLee ErranderLee commented Apr 28, 2022

๐Ÿ”จ ์ž‘์—… ๋‚ด์šฉ

  • Spring Security ์ ์šฉ
  • ๋กœ๊ทธ์ธ ํ…Œ์ŠคํŠธ

๐Ÿ“ ๊ตฌํ˜„ํ•œ ๋‚ด์šฉ

  • ์นด์นด์˜ค ์ธ์ฆ ์ฝ”๋“œ๋ฅผ ๋ฐ›๊ณ  ์œ ์ € ์ •๋ณด๋ฅผ ๋ฐ›์•„์™€์„œ Spring Security Context์— ์ธ์ฆ ๊ฐ์ฒด ์ €์žฅํ•˜์—ฌ ์„ธ์…˜ ์•„์ด๋””๋ฅผ ํด๋ผ์ด์–ธํŠธ ์ธก์˜ ์ฟ ํ‚ค๋กœ ์„ธํŒ….
  • CORS ์„ค์ •.
  • User ์—”ํ‹ฐํ‹ฐ์— kakaoId ์ถ”๊ฐ€.
  • ๋กœ๊ทธ์ธ ํ…Œ์ŠคํŠธ(์นด์นด์˜ค ์•„์ด๋””๋ฅผ ์ž„์˜๋กœ ์„ค์ •ํ•˜์—ฌ ์„ธ์…˜์ด ์„ธํŒ…๋˜๊ณ  ์˜ฌ๋ฐ”๋ฅธ ๊ฐ์ฒด๊ฐ€ ๋ฐ˜ํ™˜๋˜๋Š”์ง€ ํ™•์ธ.

๐Ÿšง ๋…ผ์˜ ์‚ฌํ•ญ

  • ๊ถŒํ•œ์„ ์–ด๋–ป๊ฒŒ ์„ค์ •ํ•  ๊ฒƒ์ธ์ง€.
  • ์„ธ์…˜ or JWT Token.

โ€ฆture/kakao_login

๏ฟฝ Conflicts:
๏ฟฝ	build.gradle
๏ฟฝ	src/main/java/com/ajou/travely/domain/user/User.java
๏ฟฝ	src/main/resources/application.yml
 - User Builder์— kakaoId ์ถ”๊ฐ€
 - ์„ธ์…˜ ์ƒ์„ฑ ์„ค์ • ์ถ”๊ฐ€
 - yml ํŒŒ์ผ์˜ ๋ณ€์ˆ˜ ์ฝ์–ด์˜ค๋„๋ก ์–ด๋…ธํ…Œ์ด์…˜ ์ถ”๊ฐ€

test :
 - User Builder ์ˆ˜์ •์— ๋”ฐ๋ฅธ ํ…Œ์ŠคํŠธ ์ˆ˜์ •
 - kakaoId๋กœ User ์ฐพ๊ณ  ํšŒ์›๊ฐ€์ž… ์—ฌ๋ถ€ ๋ฐ˜ํ™˜ํ•˜๋Š” ํ…Œ์ŠคํŠธ ์ž‘์„ฑ
 - Security Context์— kakaoId๊ฐ€ ๋“ค์–ด๊ฐ€๋Š”์ง€ Test
 - ์ธ์ฆ๊ฐ์ฒด์ธ CustomAuthentication ์ƒ์„ฑ
 - UserCreateRequestDto์— kakaoId๋ฅผ ํฌํ•จ
 - ๋กœ๊ทธ์ธ ์‹œ ๋ฐ˜ํ™˜ ํƒ€์ž…์„ JSONObject๋กœ ๋ณ€๊ฒฝํ•˜์—ฌ status(์ƒํƒœ์ฝ”๋“œ)์™€ kakaoId๋ฅผ ๋ฐ˜ํ™˜.
test :
 - ๋กœ๊ทธ์ธ ์‹œ ๋ฐ˜ํ™˜ ํƒ€์ž…์„ JSONObject๋กœ ๋ณ€๊ฒฝํ•จ์— ๋”ฐ๋ฅธ ํ…Œ์ŠคํŠธ ์ˆ˜์ •.
 - ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” import ์ œ๊ฑฐ
@ErranderLee ErranderLee changed the title Feature/kakao login feature/kakao login Apr 28, 2022
@ErranderLee ErranderLee changed the base branch from main to dev April 28, 2022 09:57
@ErranderLee ErranderLee self-assigned this Apr 28, 2022
@ErranderLee ErranderLee added ๐ŸŒˆ feat ๊ธฐ๋Šฅ์ถ”๊ฐ€ ๐Ÿ“ test ํ…Œ์ŠคํŠธ ์ถ”๊ฐ€ labels Apr 28, 2022
@ErranderLee ErranderLee linked an issue Apr 28, 2022 that may be closed by this pull request
Copy link
Member

@park0503 park0503 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์Šคํ”„๋ง ์‹œํ๋ฆฌํ‹ฐ ์‰ฝ์ง€ ์•Š์•˜์„ํ…๋ฐ, ๊ณ ์ƒ ๋งŽ์ด ํ•˜์…จ์Šต๋‹ˆ๋‹ค!

return "์„ธ์…˜ ์ €์žฅ ์™„๋ฃŒ";
}
}
public JSONObject StringToJson(String userInfo) throws ParseException {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ฉ”์†Œ๋“œ๋ช…์€ ์†Œ๋ฌธ์ž๋กœ ์‹œ์ž‘ํ•˜๋Š”๊ฒŒ ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”!

 - ๋ฉ”์„œ๋“œ ๋ช… ์นด๋ฉœ์ผ€์ด์Šค๋กœ ์ˆ˜์ •
@park0503 park0503 merged commit 2b6929a into dev Apr 28, 2022
@park0503 park0503 deleted the feature/kakao_login branch April 28, 2022 10:48
@ErranderLee ErranderLee added the โœ… reviewed ๋ฆฌ๋ทฐ์™„๋ฃŒ label Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
๐ŸŒˆ feat ๊ธฐ๋Šฅ์ถ”๊ฐ€ โœ… reviewed ๋ฆฌ๋ทฐ์™„๋ฃŒ ๐Ÿ“ test ํ…Œ์ŠคํŠธ ์ถ”๊ฐ€
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kakao OAuth ์—ฐ๋™
2 participants