modulersYJ / ganoverflow-front

2 stars 2 forks source link

feat-authJWT : 유저 데이터 관리 변경 & API 관련 전략 변경 및 구현 & 3. Auth JWT, Accounts API 구현 #3

Closed ABizCho closed 1 year ago

ABizCho commented 1 year ago

0. Common : 아래의 작업을 수행하며 발생한 interface, type 등 부수 작업들

1. 유저 데이터

  1. 유저 데이터 추가 { nickname } -> { id, nickname }
  2. 유저 데이터 관리 장소를 recoil에서 local storage로 변경하여 안정성 제고
  3. local storage -> recoil 갱신 커스텀 훅 추가하여 재사용성 제고

2. API 관련

  1. 루트 api폴더 내 구현된 파일 -> 각 페이지 폴더 별 route.ts 파일 만들어 배분 (next convention)
  2. axiosInstanceManager.ts을 이용한 axios API 객체 도메인 별 API 생성(GenerateAPI), 관리, 반출 일괄 파일 설계
    • 상호참조로 인한 초기화 전 호출문제 해결

3. Auth JWT & Accounts

  1. 로그인 시 refresh_token, access_token 저장 : refresh token 쿠키 저장, access_token 매 mount로 상태 초기화 시 마다 재발급
    • getNewAccessToken.ts
vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ganoverflow-front ❌ Failed (Inspect) Jul 2, 2023 5:34pm
ganoverflow-front-88gi ❌ Failed (Inspect) Jul 2, 2023 5:34pm