Trying to implement JWT authentication in node. Getting unauthorized in protected routes

后端 未结 2 1551
广开言路
广开言路 2021-01-24 18:55

I am trying to implement JWT authentication. /login and /register work fine and they return authentication token, but when I try to GET /secret with a header \'Authorization\' =

2条回答
  •  心在旅途
    2021-01-24 19:33

    Got it. Made a mistake in the request.

    As per the README, it should be 'Authorization' = 'bearer token_received_on_login'

提交回复
热议问题