issues
search
whynot-here
/
whynot-here-api-server
whynot-here 서비스 API 서버
3
stars
0
forks
source link
[BE] OAuth2 추가를 위한 환경 설정 세팅
#93
Closed
osj3474
closed
2 years ago
osj3474
commented
2 years ago
작업 내용은 다음과 같습니다.
Account 테이블에 auth_type 컬럼을 추가하였습니다. (+ schema.sql 변경)
local (기존 이메일 인증 방식)
google (구글 소셜 로그인)
naver (네이버 소셜 로그인)
kakao (카카오 소셜 로그인)
UserAccount 객체에 OAuth2User도 implements하여 추후 SpringSecurityContextHolder에 필요한 인증 객체로 사용할 예정입니다.
GoogleOAuth2UserInfo에서 "sub"라고 하는 키에 들어있는 값은 OAuth2에서 사용자를 식별하는 유니크한 id값의 키입니다.
google : sub
naver : response
kakao : id
Account를 식별자였던 email이 email과 auth_type 조합으로 변경되었습니다. (같은 이메일로 여러 소셜 로그인에 사용가능하기 때문)
작업 내용은 다음과 같습니다.