Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next auth 구현 및 fetch 추상화 개선 #40

Merged
merged 23 commits into from
Aug 24, 2024
Merged

Conversation

froggy1014
Copy link
Collaborator

PR 타입 ( 하나 이상의 PR 타입을 선택해주세요 )

  • 기능 추가
  • 버그 수정
  • 의존성, 환경 변수, 빌드 관련 코드 업데이트
  • 기타 사소한 수정

변경 사항

next-auth 를 이용해서 Next 서버단에서 카카오 유저정보를 가져와서 서버쪽에 바로 넘겨주고

AccessToken, RefreshToken, isProfileRegistered를 Session에 담아서

커스텀한 fetch 헤더에 토큰을 담아 실어보내고 있습니다.

middleware를 auth로 감싸서 매 요청마다 거치게 되는데 이때, jwt exp 를 확인해서 refresh를 진행해줍니다.

Copy link

vercel bot commented Aug 24, 2024

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

Name Status Preview Comments Updated (UTC)
fiesta ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 24, 2024 5:15am

@froggy1014 froggy1014 added the enhancement New feature or request label Aug 24, 2024
@froggy1014 froggy1014 merged commit 7d0b5cd into develop Aug 24, 2024
3 checks passed
@froggy1014 froggy1014 deleted the feat/next-auth branch August 24, 2024 05:15
@froggy1014 froggy1014 linked an issue Aug 24, 2024 that may be closed by this pull request
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] Next Auth 세팅
1 participant