feat: implement Google OAuth login with automatic user registration #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
구글 OAuth 인증
소셜 로그인 인증 정책
인증 Flow
클라이언트 -> API 서버 -> Supabase (<-> Google ) -> API 서버 -> 클라이언트
Token 관리
Q&A
Supabase 인증 API를 Next.js에서 구현하지 않은 이유?
앱 확장 시 일관된 인증 로직 관리를 위해 인증 로직을 Express 서버로 분리하였습니다. 이는 다양한 플랫폼과의 통합을 고려한 선택입니다.
Supabase에서 제공하는 세션 자동 갱신 기능을 사용하지 않은 이유?
이 기능은 구현이 빠르고 강력하지만, 브라우저의 storage에 세션을 저장하게 되어 보안상의 우려가 있습니다.
이를 해결하기 위해 세션을 브라우저 storage에 저장하지 않고 JS 메모리에 저장하여 보다 안전하게 사용합니다.
To do
[ ] User 데이터 types 정의
[ ] 클라이언트에 AccessToken 관리하는 ContextAPI 구현
[ ] 토큰 재발급 로직 구현
[ ] 로그인 페이지 UI 구현