son 포맷 토큰
-
JWT방식으로 Auth(Authorization, 인증)방뚝딱 학습노트 2022. 12. 18. 23:25
JWT(json web token)의 약자이다 json 포맷 토큰 / json : 자바스크립트 오브젝트를 문자열 형태로 작성한것 로그인에 성공할 경우 서버가 발급한다 유저는 매 요청시에 서버에 토큰을 함께 전송한다 매 요청시 토큰을 보내는 이유 http 무상태성 passport 러이브러를 사용 / 예) 여권을 보여주고 입장하는 형태 서버 작동할 시 해당경로로 /social-media-app/server/ 서버 켜기 npm run devstart 에러가 발생할 경우 오타일 확률이 높습니다. .env 데이터베이스 연결 주소 변경시 해결되는 경우도 있습니다. 문자로 작성시 오류나는 경우 아래 그림과 같이 127.0.0.1 로 변경하시기 바랍니다. 환경변수를 수정하면 서버를 재부팅해야 적용이 됩니다 서버 켜기 ..