'how can i implement JWT token in my website? [closed]
I implemented JWT Token Authentication in React framework, It gets me token but the problem I am getting is I am not able to authenticate it on the pages which need authentication.
I tried "Authorization: Bearer " after that authenticated url,
I tried "Authorization : JWT Token token"
Solution 1:[1]
Yo can do something like this :
const response = await axios.get('http://example.com',{ headers: {Authorization: `Bearer ${token}`}});
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Kems |