오래 못 할 짓 하지 않기
[ Spring boot Security ] 2.2 - 구글 로그인 요청 설정 본문
728x90
이 주소에 가서 API 권한을 받고 그에 대한 access id랑 비밀번호를 받는다.
이 형태에 맞게 넣어두자.
코드 ▼
더보기
#registration
spring.security.oauth2.client.registration.google.client-name=google
spring.security.oauth2.client.registration.google.client-id=
spring.security.oauth2.client.registration.google.client-secret=
spring.security.oauth2.client.registration.google.redirect-uri=http://localhost:8080/login/oauth2/code/google
spring.security.oauth2.client.registration.google.authorization-grant-type=authorization_code
spring.security.oauth2.client.registration.google.scope=profile,email
설정을 마친 뒤에
http://localhost:8080/login
이 주소로 가면 다음과 같이 뜬다.
잘 된다 야호
'혼자하기 > 연습 1) OAuth' 카테고리의 다른 글
[ Spring boot Security ] 7. 로그인 성공 JWT 발급 (0) | 2024.03.03 |
---|---|
[ Spring boot Security ] 6. JWT 발급 / 검증 (0) | 2024.03.02 |
[ Spring boot Security ] 5. 유저 정보 DB에 넣기 (0) | 2024.03.02 |
[ Spring boot Security ] 4. Oauth2UserService 만들기 (0) | 2024.03.02 |
[ Spring boot Security ] 2.1 - 네이버 로그인 요청 설정 (0) | 2024.03.01 |