Closed hyesungoh closed 1 year ago
Compared against f4a1692dd47b2373b67456bf560387e8bf8a51a2
Route | Size (gzipped) | Diff |
---|---|---|
/ |
90.68 KB | +3.59 KB |
/_app |
203.04 KB | +17.48 KB |
/_error |
76.59 KB | +3.59 KB |
/information |
77.2 KB | +3.59 KB |
/maker |
77.21 KB | +3.59 KB |
/notice |
77.57 KB | +3.59 KB |
/onboard/step1 |
77.99 KB | +3.8 KB |
/onboard/step2 |
78.02 KB | +3.59 KB |
/onboard/step3 |
79.78 KB | +3.59 KB |
/setting/alarm |
77.21 KB | +3.59 KB |
/template |
85.7 KB | +3.59 KB |
/test |
109.64 KB | +3.59 KB |
Dynamic import: No significant changes found
Latest commit: |
1e2d15a
|
Status: | ✅ Deploy successful! |
Preview URL: | https://cbdb5545.12-team3-web.pages.dev |
Branch Preview URL: | https://issue-144.12-team3-web.pages.dev |
🤔 해결하려는 문제가 무엇인가요?
API CORS
온보딩 완료 로직이 개발되기 전, 임시적으로 토큰을 발급받고 localStorage에 저장되는 버튼
closes #144, #160
🎉 어떻게 해결했나요?
rewrites를 사용해 proxy 환경 구성 https://nextjs.org/docs/api-reference/next.config.js/rewrites
pages/onboard/step1
에POST /user
API를 이용해 토큰을 발급받고 저장할 수 있는 버튼을 배치해 뒀어요비인증시 들어올 수 있는 route를 제외하고 인증이 된 사용자만 접근할 수 있도록
RouteGuard
컴포넌트를 구성했어요useCheckUserToken
hook에서 localStorage atom을 읽어isLoading
과isTokenRegistered
를 반환해요 그리고 인증시axios instance
의 헤더에 토큰 값을 넣어, 이후 요첨의 헤더에 유저 토큰이 포함돼요이를 이용해서 로딩 컴포넌트를 그리거나
children
을 그리도록 했어요📚 Attachment (Option)