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

[Server] AccessToken 발행 #11

Closed
soomanbaek opened this issue Nov 14, 2022 · 0 comments
Closed

[Server] AccessToken 발행 #11

soomanbaek opened this issue Nov 14, 2022 · 0 comments
Assignees
Labels
✨ feature 기능 추가 🌐 server 서버 작업
Milestone

Comments

@soomanbaek
Copy link
Member

soomanbaek commented Nov 14, 2022

🤷‍♂️ Description

AccessToken 발행 로직 구현

📒 Remarks

expires: 15m
respose payload로 보냄 (client 서버에서 로컬 변수로 저장하기 위함)

@soomanbaek soomanbaek added 🌐 server 서버 작업 ✨ feature 기능 추가 labels Nov 14, 2022
@soomanbaek soomanbaek added this to the ⛰️ Week2 milestone Nov 14, 2022
soomanbaek added a commit that referenced this issue Nov 16, 2022
- accessToken은 payload에 저장
- refreshToken은 cookie에 저장
NaayoungKwon pushed a commit that referenced this issue Nov 16, 2022
* build: jwt 인증 관련 패키지 설치

- @nestjs/jwt
- passport-jwt
- @types/passport-jwt

* feat: user.repository에 updateOne함수 생성

* build: server package에 passport 라이브러리 추가

* feat: accessToken, refreshToken 발행

- 로그인 성공 시 발행 응답에 포함시켜줌

* feat: #12 RefreshToken DB에 넣어주기

* feat: #11, #12 accessToken, refreshToken 발행

- accessToken은 payload에 저장
- refreshToken은 cookie에 저장

* build: server에 cookie-parser 설치

* feat: responseForm 형태 변경

- result: object 형태

* build: yarn.lock 업데이트

* feat: 계정 생성시 에러 처리

* fix: auth.module에서 ConfigMoudle import 제거

- api.module에서 Golbal로 import를 하여서 auth.module에서 할 필요 없음

* refactor: signToken 반환형 변경 (배열 -> 객체)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature 기능 추가 🌐 server 서버 작업
Projects
None yet
Development

No branches or pull requests

2 participants