Skip to content
JiEun Lee edited this page Nov 8, 2020 · 2 revisions

jsonwebtoken

jsonwebtoken 공식

  • JSON 웹 토큰 구현을 위한 노트 패키지
  • 기본 사용법 jwt.sign (payload, secretOrPrivateKey, [옵션, 콜백])
  • 사용한 옵션
    • algorithm : 기본값 HS256
    • expiresIn : 토큰 만료(ex. 60, 2 days, 10h, 7d)
    • subject : 토큰 제목
Clone this wiki locally