Skip to content

[FEAT] 구글 소셜 로그인, accessToken 재발급 처리 및 온보딩 API 연동 - #152

Merged
kimminna merged 18 commits into
developfrom
feat/web/147-google-login-token-refresh
Jul 12, 2026
Merged

[FEAT] 구글 소셜 로그인, accessToken 재발급 처리 및 온보딩 API 연동#152
kimminna merged 18 commits into
developfrom
feat/web/147-google-login-token-refresh

Conversation

@ehye1

@ehye1 ehye1 commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

ISSUE 🔗

close #147



What is this PR? 🔍

구글 OAuth 로그인 흐름을 구현했습니다. 로그인 버튼 클릭부터 콜백 처리, accessToken 저장, 회원/비회원 분기 라우팅, 토큰 만료 시 자동 재발급, 온보딩 완료 API 연동, 그리고 에러 처리까지 포함합니다.

배경

  • 기존 구조: 로그인 버튼 클릭 시 리다이렉트 URL이 TODO로 비어 있었고, 인증 상태를 전역으로 관리하는 구조가 없었습니다.
  • 발생 문제: API 요청마다 토큰을 수동으로 첨부해야 했고, 401 응답 시 재발급 로직도 없어 인증이 끊기면 사용자가 직접 재로그인해야 했습니다.
  • 해결 방향: Zustand로 accessToken을 전역 관리하고, axios 인터셉터에서 자동 첨부·재발급을 처리하는 구조로 전환했습니다.

파일별 역할

파일 역할
stores/auth/useAuthStore.ts accessToken 전역 상태 (Zustand)
api/client/axios.ts 요청 인터셉터(토큰 첨부) + 응답 인터셉터(401 재발급)
app/[locale]/oauth/callback/ OAuth 콜백 라우트 — code 교환 → 토큰 저장 → 분기, AsyncBoundary 적용
providers/auth/AuthGuardProvider.tsx 페이지 진입 시 토큰 유무 확인 및 재발급 시도
app/[locale]/(main)/layout.tsx AuthGuardProvider로 main 레이아웃 전체를 감쌈
app/[locale]/login/_containers/LoginContainer.tsx 구글 버튼 클릭 시 OAuth 인증 페이지로 리다이렉트, 고정 너비 제거
app/[locale]/onboarding/page.tsx AuthGuardProvider로 감싸 비로그인 접근 차단
onboarding/_containers/OnboardingFunnelContainer.tsx 온보딩 완료 API 연동, 실패 시 에러 토스트 표시
onboarding/_containers/CalendarConnectStepContainer.tsx isPending prop 추가로 중복 제출 방지
components/boundary/SectionErrorFallback.tsx 섹션 단위 에러 폴백 컴포넌트 (신규)
app/[locale]/(main)/(with-time-sidebar)/home/page.tsx 홈 섹션 AsyncBoundary에 SectionErrorFallback 연결

로그인 전체 흐름

1. 로그인 버튼 클릭
   └─ window.location.href = /oauth2/authorization/google

2. 구글 인증 완료 후 /oauth/callback?code=... 로 리다이렉트

3. OauthCallbackContainer
   └─ useToken(code) 호출
   └─ onSuccess: accessToken → Zustand 저장
              user → React Query 캐시에 setQueryData
              isNewUser → true면 /onboarding, false면 /home 이동
   └─ onError: /login 으로 이동

4. 이후 API 요청 (axios request interceptor)
   └─ Authorization: Bearer {accessToken} 자동 첨부

5. 401 응답 발생 (axios response interceptor)
   └─ reissue API 호출 (중복 방지: Promise 재사용)
   └─ 성공: 새 accessToken 저장 → 원 요청 재시도
   └─ 실패: accessToken 초기화 → /login 리다이렉트

6. 새로고침 (accessToken 없는 상태로 진입)
   └─ AuthGuardProvider: reissue 시도
   └─ 성공: accessToken 저장 후 화면 렌더
   └─ 실패: /login 리다이렉트

7. 온보딩 완료 (CalendarConnect 단계)
   └─ useCompleteOnboarding 호출
   └─ 성공: 선택한 언어 locale로 /home 리다이렉트
   └─ 실패: AnimatedToast로 에러 메시지 표시
   └─ isPending 중: 시작 버튼 비활성화로 중복 제출 방지

useAuthStore

  • 변경 요약: accessToken 전역 상태를 Zustand store로 구현했습니다.
  • 이유: 인터셉터(모듈 스코프)와 컴포넌트(훅 스코프) 양쪽에서 토큰에 접근해야 했습니다. 훅은 컴포넌트 외부에서 호출할 수 없으므로, useAuthStore.getState()로 모듈 스코프에서도 접근 가능한 Zustand를 선택했습니다.
  • 경계 · 제약: 메모리 저장이므로 새로고침 시 초기화됩니다. 새로고침 후 복구는 AuthGuardProvider의 reissue 호출이 담당합니다.

axios 인터셉터

  • 변경 요약: 요청 인터셉터에 accessToken 첨부, 응답 인터셉터에 401 재발급 및 원 요청 재시도 로직을 추가했습니다.
  • 구현 방식: 재발급 중복 방지를 위해 reissuePromise 변수에 진행 중인 Promise를 저장합니다. 동시에 401이 여러 번 발생해도 reissue는 한 번만 호출되고, 완료 후 null로 초기화됩니다. 무한 재시도 방지를 위해 retriedRequests WeakSet에 이미 재시도한 요청을 기록합니다.
  • 경계 · 제약: reissue API 자체의 401은 재시도 대상에서 제외합니다(isReissueRequest 플래그).

OauthCallbackContainer

  • 변경 요약: /oauth/callback 라우트에서 authorization code를 accessToken으로 교환하고 분기 라우팅을 처리합니다.
  • 구현 방식: useSearchParamscode를 읽어 useToken mutation을 호출합니다. 성공 시 queryClient.setQueryData로 user 정보를 React Query 캐시에 직접 주입해 별도 조회 없이 이후 컴포넌트에서 사용 가능하게 합니다. hasRequested ref로 Strict Mode 이중 호출을 방지합니다. 프로젝트 공통 AsyncBoundary로 교체했습니다.

AuthGuardProvider

  • 변경 요약: main 레이아웃 및 온보딩 페이지 진입 시 accessToken 유무를 확인하고, 없으면 reissue를 시도해 화면을 보호합니다.
  • 구현 방식: accessToken이 있으면 바로 렌더, 없으면 reissue 후 성공 시 토큰 저장 및 렌더, 실패 시 /login으로 이동합니다. reissue 완료 전에는 null을 반환해 children을 렌더하지 않습니다.

온보딩 완료 API 연동

  • 변경 요약: useCompleteOnboarding 훅을 CalendarConnect 단계 제출에 연동했습니다.
  • 구현 방식: 언어 선택값("ko" | "en")을 OnboardingRequestLanguage enum으로 매핑 후 API 호출합니다. 완료 후 선택한 언어 locale로 홈 페이지에 리다이렉트합니다. isPending 상태를 시작 버튼에 연결해 중복 제출을 방지하고, 실패 시 AnimatedToast로 에러 메시지를 표시합니다.

SectionErrorFallback

  • 변경 요약: 섹션 단위 에러 폴백 컴포넌트를 신규 추가하고 홈 페이지 AsyncBoundary에 연결했습니다.
  • 구현 방식: 에러 발생 시 재시도 버튼을 포함한 폴백 UI를 표시합니다. reset 콜백으로 ErrorBoundary를 초기화해 재시도를 지원합니다.



To Reviewers

로그인/온보딩 완료 여부에 따른 라우트 접근 제어는 아직 구현되지 않았습니다. onboardingCompleted 상태를 어디에서 관리할지(store/localStorage 등)와 백엔드에서 해당 접근을 보장하는지 확인이 필요하여, 구현 방향을 추가로 논의하고 반영할 예정입니다.



Screenshot 📷



Test Checklist ✔

  • lint-staged(prettier + eslint) 통과
  • 구글 로그인 버튼 클릭 → OAuth 인증 페이지 리다이렉트 확인 — 백엔드 연동 환경 필요
  • /oauth/callback 콜백 처리 및 홈 분기 — 백엔드 연동 환경 필요
  • accessToken 만료 후 401 → 자동 재발급 및 원 요청 재시도 — 백엔드 연동 환경 필요
  • refreshToken 만료 시 /login 리다이렉트 — 백엔드 연동 환경 필요
  • 비로그인 상태에서 /onboarding 직접 접근 시 /login 리다이렉트 확인 — 백엔드 연동 환경 필요
  • 온보딩 완료 → 언어 locale 기반 홈 리다이렉트 확인 — 백엔드 연동 환경 필요
  • 온보딩 완료 버튼 중복 클릭 방지 동작 확인 — 백엔드 연동 환경 필요
  • 온보딩 API 실패 시 에러 토스트 표시 확인 — 백엔드 연동 환경 필요
  • 홈 섹션 에러 발생 시 SectionErrorFallback 및 재시도 동작 확인

@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
timo Ready Ready Preview, Comment Jul 12, 2026 4:22pm

Request Review

@github-actions
github-actions Bot requested review from jjangminii and kimminna July 12, 2026 10:20
@github-actions github-actions Bot added ⏰ Timo-web Timo 웹 서비스 ✨ Feature 새로운 기능(기능성) 구현 ♥️ 혜원 혜원양 labels Jul 12, 2026
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Google OAuth 로그인과 콜백 토큰 교환을 추가하고, accessToken을 Zustand에 저장하도록 구성했습니다. 인증 가드와 axios 토큰 재발급·재시도를 연결했으며, 온보딩 완료 API, 오류 재시도 UI, 빌드 환경 변수도 반영했습니다.

Changes

인증 및 Google OAuth 흐름

Layer / File(s) Summary
인증 상태와 보호 레이아웃
apps/timo-web/stores/auth/useAuthStore.ts, apps/timo-web/providers/auth/AuthGuardProvider.tsx, apps/timo-web/constants/routes.ts, apps/timo-web/app/[locale]/(main)/layout.tsx, apps/timo-web/app/[locale]/onboarding/page.tsx
Zustand에 토큰 상태를 추가하고, 메인·온보딩 콘텐츠를 인증 가드 안에서 렌더링합니다.
Google OAuth 콜백 처리
apps/timo-web/app/[locale]/login/..., apps/timo-web/app/[locale]/oauth/callback/...
Google OAuth로 이동하고, 콜백 code를 토큰으로 교환한 뒤 사용자 캐시와 신규 사용자별 라우팅을 갱신합니다.

API 토큰 재발급

Layer / File(s) Summary
axios 인증 인터셉터 및 빌드 환경
apps/timo-web/api/client/axios.ts, .github/workflows/ci.yml, .github/workflows/performance.yml
Bearer 토큰과 쿠키 인증을 적용하고, 401 응답에서 토큰 재발급 후 원본 요청을 재시도합니다. 빌드에 API 기본 URL도 주입합니다.

온보딩 및 오류 처리

Layer / File(s) Summary
온보딩 제출 흐름
apps/timo-web/app/[locale]/onboarding/_containers/*
언어를 API 형식으로 변환해 완료 API를 호출하고, 처리 중 버튼을 비활성화하며 성공 시 홈으로 이동합니다.
섹션 오류 재시도 UI
apps/timo-web/components/boundary/SectionErrorFallback.tsx, apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/page.tsx, apps/timo-web/messages/*.json
홈 섹션 오류 시 번역된 설명과 재시도 버튼을 표시합니다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

Google OAuth 및 콜백 처리

sequenceDiagram
  participant LoginContainer
  participant GoogleOAuth
  participant OauthCallbackContainer
  participant useToken
  participant useAuthStore
  LoginContainer->>GoogleOAuth: OAuth URL로 이동
  GoogleOAuth-->>OauthCallbackContainer: code 전달
  OauthCallbackContainer->>useToken: code 토큰 교환
  useToken-->>OauthCallbackContainer: accessToken과 사용자 정보 반환
  OauthCallbackContainer->>useAuthStore: accessToken 저장
  OauthCallbackContainer-->>OauthCallbackContainer: 캐시 갱신 및 라우팅
Loading

accessToken 재발급 및 요청 재시도

sequenceDiagram
  participant axios
  participant useAuthStore
  participant ReissueEndpoint
  participant OriginalRequest
  axios->>useAuthStore: accessToken 조회
  axios->>OriginalRequest: Authorization 헤더로 요청
  OriginalRequest-->>axios: 401 응답
  axios->>ReissueEndpoint: 토큰 재발급 요청
  ReissueEndpoint-->>axios: 새 accessToken 반환
  axios->>useAuthStore: 새 토큰 저장
  axios->>OriginalRequest: 원본 요청 재전송
Loading

Possibly related PRs

Suggested labels: ♦️ 민아

Suggested reviewers: yumin-kim2, jjangminii

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning 온보딩 API 연동, AuthGuardProvider, 홈 에러 폴백처럼 #147 범위를 넘는 기능이 함께 포함되어 있습니다. 이슈 #147 범위 외 기능은 별도 PR이나 추가 이슈로 분리하고, 인증 흐름 변경만 남겨 범위를 맞추세요.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed 이슈 #147의 요구사항인 OAuth 리다이렉트, code 교환, store 저장, 캐시 반영, 분기 라우팅, 인터셉터 재발급이 구현되었습니다.
Title check ✅ Passed 구글 소셜 로그인, 토큰 재발급, 온보딩 연동이라는 핵심 변경점을 간결하게 담고 있어 제목이 적절합니다.
Description check ✅ Passed 구현 범위와 변경 흐름이 온전히 PR 내용과 맞닿아 있어 설명이 충분히 관련 있습니다.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/web/147-google-login-token-refresh

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 12, 2026

Copy link
Copy Markdown

Timo Performance Report

Bundle Size — timo-web
라우트 크기 First Load JS
/[locale]/home 193.94 kB 🔴 399.78 kB
/[locale]/today 154.38 kB 🔴 360.21 kB
/[locale]/focus 151.31 kB 🔴 357.15 kB
/[locale]/settings/account 0 B 🟡 205.83 kB
/[locale]/settings 161.33 kB 🔴 367.16 kB
/[locale]/statistics 149.85 kB 🔴 355.68 kB
/[locale]/[...rest] 0 B 🟡 205.83 kB
/[locale]/login 116.84 kB 🟡 322.67 kB
/[locale]/oauth/callback 116.86 kB 🟡 322.70 kB
/[locale]/onboarding 228.83 kB 🔴 434.67 kB
/[locale] 0 B 🟡 205.83 kB

공유 번들: 205.83 kB
🟢 < 200kB  |  🟡 < 350kB  |  🔴 ≥ 350kB (First Load JS · gzip)

Lighthouse — timo-web
URL Perf A11y LCP CLS TBT
/en/home 🔴 59 🟢 95 🔴 15.8s 🟢 0.000 🟡 598ms
/en/today 🔴 60 🟢 95 🔴 15.3s 🟢 0.000 🟡 579ms
/en/focus 🔴 61 🟢 95 🔴 15.2s 🟢 0.000 🟡 527ms
/en/statistics 🔴 61 🟢 95 🔴 15.3s 🟢 0.000 🟡 533ms

Perf ≥ 70 / A11y ≥ 85 목표
LCP 🟢 < 2.5s 🟡 < 4s 🔴 ≥ 4s  |  CLS 🟢 < 0.1 🟡 < 0.25 🔴 ≥ 0.25  |  TBT 🟢 < 200ms 🟡 < 600ms 🔴 ≥ 600ms

Image Optimization — timo-web
파일 크기 포맷 상태
images/google-calendar.png 36.20 kB PNG ⚠️ 🟢
images/google-logo.png 26.79 kB PNG ⚠️ 🟢

총 2개 · 63.00 kB  |  🟢 < 200KB  |  🟡 < 500KB  |  🔴 ≥ 500KB
⚠️ 2개 파일 WebP/AVIF 변환 권장

측정 커밋: bf70105

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/timo-web/api/client/axios.ts`:
- Line 69: Update the axios interceptor’s expired-refresh-token redirect to use
the i18n navigation router’s replace("/login") API, consistent with
AuthGuardProvider and OauthCallbackContainer, instead of assigning
window.location.href. Reuse the existing router/navigation setup and preserve
the current login destination.
- Around line 63-67: Update the response flow around reissueAccessToken so that
an undefined or otherwise missing newAccessToken also redirects the user to
/login. Preserve the existing retry through instance(originalRequest) only when
a valid token is returned, and ensure every failed token reissue path completes
with the login redirect.

In
`@apps/timo-web/app/`[locale]/oauth/callback/_containers/OauthCallbackContainer.tsx:
- Around line 19-37: Update the OAuth callback effect in OauthCallbackContainer
so both missing code and successful responses without data.accessToken redirect
to /login via router.replace instead of leaving the page. Preserve the existing
token setup and onboarding/home redirects for valid successful responses, and
retain the mutation onError redirect.
- Line 29: Update the queryClient.setQueryData call in OauthCallbackContainer to
use the shared getGetMyProfileQueryKey() helper instead of the hard-coded
["user", "me"] key, ensuring it matches the key used by useGetMyProfile.

In `@apps/timo-web/app/`[locale]/oauth/callback/page.tsx:
- Around line 7-9: Add a loading fallback to the Suspense boundary wrapping
OauthCallbackContainer, such as the existing loading spinner component, so users
see feedback while the OAuth callback and token exchange are processing.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0651b6bd-2c65-4302-9ca2-03af6a3e55d1

📥 Commits

Reviewing files that changed from the base of the PR and between 2d480a7 and 5eccca3.

📒 Files selected for processing (8)
  • apps/timo-web/api/client/axios.ts
  • apps/timo-web/app/[locale]/(main)/layout.tsx
  • apps/timo-web/app/[locale]/login/_containers/LoginContainer.tsx
  • apps/timo-web/app/[locale]/oauth/callback/_containers/OauthCallbackContainer.tsx
  • apps/timo-web/app/[locale]/oauth/callback/page.tsx
  • apps/timo-web/app/[locale]/onboarding/_components/OnboardingGoogleButton.tsx
  • apps/timo-web/providers/auth/AuthGuardProvider.tsx
  • apps/timo-web/stores/auth/useAuthStore.ts

Comment thread apps/timo-web/api/client/axios.ts
Comment thread apps/timo-web/api/client/axios.ts Outdated
return instance(originalRequest);
}
} catch {
window.location.href = "/login"; // refreshToken도 만료된 경우

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

window.location.href = "/login"가 i18n 라우팅을 우회합니다.

AuthGuardProviderOauthCallbackContainer@/i18n/navigationrouter.replace("/login")을 사용하여 locale prefix가 자동으로 추가됩니다. 반면 axios 인터셉터는 window.location.href를 직접 사용하여 middleware가 처리해주길 기대하고 있습니다. 일관성 및 잉여 리다이렉트 방지를 위해 통일을 권장합니다.

참고: Next.js Internationalization

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/timo-web/api/client/axios.ts` at line 69, Update the axios interceptor’s
expired-refresh-token redirect to use the i18n navigation router’s
replace("/login") API, consistent with AuthGuardProvider and
OauthCallbackContainer, instead of assigning window.location.href. Reuse the
existing router/navigation setup and preserve the current login destination.

Comment thread apps/timo-web/app/[locale]/oauth/callback/_containers/OauthCallbackContainer.tsx Outdated
Comment thread apps/timo-web/app/[locale]/oauth/callback/page.tsx Outdated
…to feat/web/147-google-login-token-refresh
- reissueData 전체를 받아 accessToken을 추출하도록 수정했습니다
- 로그인 리다이렉트 조건을 data 존재 여부 기준으로 수정했습니다
Comment thread apps/timo-web/app/[locale]/oauth/callback/page.tsx Outdated
- w-101 고정 너비를 제거하고 좌우 px-12.5(50px) 패딩 기반으로 변경했습니다
- useCompleteOnboarding 훅을 연동하여 온보딩 완료 API를 호출했습니다
- 언어 선택값을 OnboardingRequestLanguage enum으로 매핑했습니다
- 완료 후 선택한 언어 locale로 홈 페이지에 리다이렉트했습니다

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@apps/timo-web/app/`[locale]/onboarding/_containers/OnboardingFunnelContainer.tsx:
- Line 41: Update OnboardingFunnelContainer’s useCompleteOnboarding usage to
also extract its isPending state, then pass that state through to
CalendarConnectStepContainer or connect it to the relevant submit button’s
disabled behavior. Ensure the button remains disabled while completeOnboarding
is in progress, preventing duplicate submissions.
- Around line 124-140: Update the completeOnboarding mutation options in
OnboardingFunnelContainer to add an onError handler alongside onSuccess. Ensure
API failures provide visible user feedback and leave the user able to retry or
continue from the CalendarConnect step instead of remaining stuck, while
preserving the existing successful redirect to ROUTES.HOME.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 20ad7896-67c3-45ce-a71a-7e25c7b31637

📥 Commits

Reviewing files that changed from the base of the PR and between 4bb860d and 46ea500.

📒 Files selected for processing (2)
  • apps/timo-web/app/[locale]/login/_containers/LoginContainer.tsx
  • apps/timo-web/app/[locale]/onboarding/_containers/OnboardingFunnelContainer.tsx

Comment thread apps/timo-web/app/[locale]/onboarding/_containers/OnboardingFunnelContainer.tsx Outdated
ehye1 added 2 commits July 13, 2026 00:02
- 프로젝트 공통 AsyncBoundary 컴포넌트로 교체했습니다
- useCompleteOnboarding에서 isPending을 추출했습니다
- CalendarConnectStepContainer에 isPending prop을 전달했습니다
- API 호출 중 시작 버튼을 비활성화하여 중복 제출을 방지했습니다
@ehye1 ehye1 changed the title [FEAT] 구글 소셜 로그인 및 accessToken 재발급 처리 [FEAT] 구글 소셜 로그인, accessToken 재발급 처리 및 온보딩 API 연동 Jul 12, 2026

@jjangminii jjangminii left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

로그인 api 수고하셨습니다~~
간단한 코멘트 확인해주세요~~

Comment on lines +126 to +140
data: {
language: ONBOARDING_LANGUAGE_MAP[answers.language],
predictionAccuracy: answers.predictionAccuracy,
wakeUpTime: answers.wakeUpTime,
bedTime: answers.bedTime,
},
},
{
onSuccess: () => {
router.replace(ROUTES.HOME, {
locale: answers.language,
});
},
},
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

온보딩 API가 아직 검증되지 않은 상태라고 To Reviewers에 명시하셨는데, 정작 실패 핸들러가 없어요. 실패하면 사용자가 CalendarConnect 단계에서 아무 피드백 없이 멈춰요. 간단하게 .alert 토스트로 피드백 주는건 어떤가요?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아주 좋은 의견입니다. 온보딩 API에 onError 추가하고 Home 넘어갈 때 errorFallback 추가하겠습니다.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next.js는 error.tsx를 통한 라우트 단위 에러 처리만 지원하고, 현재 구조에서는 Server Component → Client Component로 fallback 함수를 전달할 수 없어서 Home의 errorFallback 다시 제거했습니다 ~

ehye1 added 2 commits July 13, 2026 00:34
- AuthGuardProvider로 감싸 비로그인 시 로그인 페이지로 리다이렉트했습니다
- completeOnboarding onError 핸들러를 추가했습니다
- API 실패 시 AnimatedToast로 에러 메시지를 표시했습니다
- ko/en 메시지 파일에 토스트 및 섹션 에러 키를 추가했습니다
- SectionErrorFallback 컴포넌트를 추가했습니다
- 홈 헤더 및 투두 섹션 AsyncBoundary에 errorFallback을 연결했습니다
ehye1 added 3 commits July 13, 2026 01:17
- Server Component에서 Client Component로 함수 prop 전달 불가 제약으로 SectionErrorFallback을 제거했습니다
- AsyncBoundary에서 errorFallback을 제거하고 기본 Suspense 동작으로 되돌렸습니다
- AM/PM 표시를 제거하고 24시간 형식으로 단순화했습니다
- 드롭다운 목록에 scrollbar-sm 클래스를 적용했습니다
- 미사용 get-am-pm 유틸 파일을 삭제했습니다
- 취침 시간 유효성 검사를 <= 에서 === 로 수정해 같은 시간만 에러로 처리했습니다
- 취침 시간 에러 메시지를 검증 로직에 맞게 수정했습니다
@kimminna
kimminna merged commit 053f72c into develop Jul 12, 2026
16 checks passed
@kimminna
kimminna deleted the feat/web/147-google-login-token-refresh branch July 12, 2026 17:25
@kimminna kimminna mentioned this pull request Jul 14, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Jul 16, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 새로운 기능(기능성) 구현 ⏰ Timo-web Timo 웹 서비스 ♥️ 혜원 혜원양

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 구글 소셜 로그인 및 accessToken 재발급 처리

3 participants