Social Login - 폼 인증 & 카카오 추가 및 리팩토링

기존 registrationId에 따라 if문으로 분기하던 AbstractOAuth2UserService의 로직을 좀 더 유연하고 확장성 있게 변경하도록 한다.
application.yml
Last updated

기존 registrationId에 따라 if문으로 분기하던 AbstractOAuth2UserService의 로직을 좀 더 유연하고 확장성 있게 변경하도록 한다.
Last updated
server:
port: 8081
spring:
security:
oauth2:
client:
registration:
kakao:
client-id: b170033e2933d7359f9d757a0da6b67d
client-secret: s6euKpKvFTIqpXtDSHHgybUeIVnydR4S
redirect-uri: http://localhost:8081/login/oauth2/code/kakao # /login/oauth2/code 는 스프링 시큐리티에서 정해놓은 기본값
client-name: client-app
authorization-grant-type: authorization_code
client-authentication-method: client_secret_post
scope:
- openid
- profile_nickname
- profile_image
- account_email
provider: kakao
google:
...
naver:
...
provider:
kakao: # issuer-uri 정보만 있으면 나머지 uri 정보들은 필요 없다.
issuer-uri: https://kauth.kakao.com
authorization-uri: https://kauth.kakao.com/oauth/authorize
token-uri: https://kauth.kakao.com/oauth/token
user-info-uri: https://kapi.kakao.com/v2/user/me
jwk-set-uri: https://kauth.kakao.com/.well-known/jwks.json
user-name-attribute: id
naver:
...