강의

멘토링

커뮤니티

Inflearn Community Q&A

faker's profile image
faker

asked

Solid backend NestJS, from basics to advanced

Passport and Authentication Strategy & Custom decorator

본 예시에서는 클라이언트에서 JWT를 어디에 저장했나요?

Written on

·

225

1

Express로 코딩을 하다 Nest를 써보고 싶어서 해당 강의를 수강중입니다. Express를 사용할 때는 JWT를 Cookie에 저장하여 매 요청때마다 인증하는 방식을 사용했었는데요.

 

본 예제에서는 JWT를 HTTP Header의 Authorization에 표함시켜 요청을 보내는 것 같은데, 그럼 JWT를 어디에 저장했는지 궁금합니다.

NestJSssrmongodbexpressnodejs

Answer 1

1

amamov님의 프로필 이미지
amamov
Instructor

본 예시에서는 "예시"이기 때문에 단순히 로컬스토리지에 저장했습니다. 

실무에서는 httponly cookie에 저장하시는 것을 추천드립니다. 

faker님의 프로필 이미지
faker
Questioner

감사합니다.

faker's profile image
faker

asked

Ask a question