I save the response in local storage in console using angular6. Response contain (Id token, access token , JWT token) I want access token for user authentication. How I get this from local storage using angular.Here is the Access Token
Asked
Active
Viewed 1.3k times
0
-
look at this and adjust the line that get the token https://stackoverflow.com/questions/50970446/http-error-handling-in-angular-6/50970853#50970853 – firegloves Jun 22 '18 at 18:49
1 Answers
1
Let's say u have stored the server response with the key called Token:
in the local storage.
var accessTokenObj = JSON.parse(localStorage.getItem("Token:"));
console.log(accessTokenObj);

Hari
- 1,545
- 1
- 22
- 45