feat(fe): impl kakao login#3628
Conversation
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request introduces social login integration (primarily Kakao) and refactors the login and signup flows, including the addition of a SocialLoginHandler to manage NextAuth sessions, a new LogInLayout, and an InfoModal for unlinked social accounts. The code review feedback suggests several improvements: wrapping the login page in a <Suspense> boundary to prevent CSR de-optimization from useSearchParams(), removing unused commented-out code and an unused store selector, using the centralized baseUrl constant instead of raw environment variables, and properly handling unimplemented social login buttons to prevent user confusion.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Description
카카오 로그인 연동
case 별 상이한 모달이 뜹니다.
최초 가입자 / 기존 가입자 별 소셜 로그인을 먼저 했을 때, 소셜 로그인이 아직 연동되지 않았을 때
분기를 나누어 이동할 수 있도록 작업합니다.
Additional context
개요
카카오 소셜 로그인 도입에 따른 프론트엔드 작업입니다. 백엔드 PR(#3627,
t2752-redirect-to-frontend-after-kakao-oauth)의 redirect 변경에 맞춰, 로그인 시나리오를 4가지로 나눠 처리했습니다.구현된 케이스
케이스 1 — 기존 가입자, 카카오로 로그인
/로 redirect (쿼리 파라미터 없음)accessToken(헤더)은 날아가고refresh_token만 쿠키로 남기 때문에,SocialLoginHandler.tsx가 홈 진입 시 자동으로GET /auth/reissue→GET /user호출해서 토큰/유저 정보를 받아오고, NextAuthsocialprovider(authorizeSocial.ts,authOptions.ts)로 세션을 생성합니다.components/auth/SocialLoginHandler.tsx,libs/auth/authorizeSocial.ts,libs/auth/authOptions.ts,app/(client)/layout.tsx(마운트 지점)케이스 2 — 미가입자, 카카오로 로그인 (신규가입 유도)
/login?modal=social-unlinked&oauthToken=xxx로 redirectLogInPage.tsx가oauthToken을 쿼리에서 읽어stores/socialAuth.ts(zustand)에 저장/signup으로 이동, store는 유지됨케이스 3 — 카카오 로그인 시도했지만 기존 계정 존재 (모달에서 "로그인" 선택)
/login으로 이동(oauthToken은 store에 유지)oauthToken이 남아있으면 자동으로POST auth/social-link를 호출해서 카카오 계정을 연동케이스 4 — 일반 로그인 후 소셜 로그인 프로모션 모달
/settings이동localStorage기반으로 당일 재노출 방지 (libs/auth/socialLoginPromoDismissal.ts)GET /user가 연동 상태를 안 내려줘서 프론트에서 판단할 방법이 없기 때문입니다. Settings 페이지에서 소셜 연동 UI를 만들 때, 백엔드와 협의해서GET /user응답에 연동된 provider 목록을 추가하면 이 모달을 정확하게 스킵시킬 수 있습니다.추가
Figma에는 없지만, 깃허브+구글+네이버 로그인 시도 시 '준비 중인 기능입니다'를 띄워 작동하지 않도록 막았습니다.

로컬 테스트 시 참고사항
main에 머지되지 않아서, 실제 카카오 redirect 흐름은 로컬에서 백엔드를 직접 띄워야 검증 가능합니다 (카카오 시크릿 필요).Before submitting the PR, please make sure you do the following
fixes #123).closes TAS-2754