Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- spring boot security
- 수제비
- Node.js
- 프론트엔드
- VUE
- Front-End
- 백엔드개발자
- 정보처리기사 실기
- 스프링부트
- JavaScript
- spring
- 자바스크립트
- React
- 백엔드
- JS
- TypeScript
- spring boot
- It
- JWT
- useState
- 웹개발자
- 리액트
- Redux
- frontend
- Authentication
- 큐넷
- 정보처리기사
- TS
- 타입스크립트
- security
Archives
- Today
- Total
솔적솔적
Spring Boot Security - NAVER(네이버) 로그인 완료하기 본문
https://developers.naver.com/main/
NAVER Developers
네이버 오픈 API들을 활용해 개발자들이 다양한 애플리케이션을 개발할 수 있도록 API 가이드와 SDK를 제공합니다. 제공중인 오픈 API에는 네이버 로그인, 검색, 단축URL, 캡차를 비롯 기계번역, 음
developers.naver.com




application.yml
naver:
client-id:아직모름
client-secret:아직모름
scope:
-name
-email
client-name:Naver
authorization-grant-type:authorization_code
redirect-uri:http://localhost:8080/login/oauth2/code/naver ------> 고대로 넣어주기

application.yml
naver:
client-id:htghxb0Uip50vz6twKLC ------> 넣어주기
client-secret:MJRTzZ2D5D ------------> 넣어주기
scope:
-name
-email
client-name:Naver
authorization-grant-type:authorization_code
redirect-uri:http://localhost:8080/login/oauth2/code/naver
하지만 오류가 발생되게 되는데,

application.yml
naver:
client-id:htghxb0Uip50vz6twKLC
client-secret:MJRTzZ2D5D
scope:
-name
-email
client-name:Naver
authorization-grant-type:authorization_code
redirect-uri:http://localhost:8080/login/oauth2/code/naver
provider:
naver:
authorization-uri:https://nid.naver.com/ouath2.0/authorze
token-uri:https://nid.naver.com/oauth2.0/token
user-info-uri:https://openapi.naver.com/v1/nid/me
user-name-attribute:resposne #회원정보를 JSON으로 받은데 RESPONSE라는 키값으로 네이버를 리턴해줌

요기 주소로 로그인하면 네이버창이 뜬다는 것.
loginForm.html
<h1>로그인 페이지</h1>
<form action="/login" method="POST">
<input type="text" name="username" placeholder="username"><br/>
<input type="password" name="password" placeholder="password"><br/>
<button>로그인</button>
</form>
<a href="/oauth2/authorization/google">구글 로그인</a>
<a href="/oauth2/authorization/fackbook">페이스북 로그인</a>
<a href="/oauth2/authorization/naver">네이버 로그인</a>
<a href="/joinForm">회원가입을 아직 하지 않으셨나요?</a>
[참고] 인프런 - 스프링부트 시큐리티 & JWT 강의
'Back-end > Spring Boot Security' 카테고리의 다른 글
| SpringBoot기반으로 Security 개발(자세히 파해쳐보자)_2 (0) | 2022.02.21 |
|---|---|
| SpringBoot기반으로 Security 개발(자세히 파해쳐보자)_1 (0) | 2022.02.21 |
| Spring Boot Security - 구글 로그인 및 자동 회원가입 진행 완료 (0) | 2022.02.09 |
| Spring Boot Security - Authentication 객체가 가질 수 있는 2가지 타입 (0) | 2022.02.09 |
| Spring Boot Security - 구글 로그인,구글 회원 프로필 정보 받기 (0) | 2022.02.08 |