I'm trying to use my sessionStorage to retrieve a user ID so that users can access information attached to them. I get the sessionStorage as a token but for some reason when I try access a parameter it comes out as undefined.
var userToken = TokenService.getAuthToken();
// getAuthToken() {
// return window.sessionStorage.getItem(config.TOKEN_KEY)
// },
console.log('userKey: ' + userToken)
//userKey: {"userName":"turtlesoup","password":"password","userID":"Z100"}
console.log(userToken.userID);
//undefined
edit: The issue isn't getting the session information. As I put in the sample code. I get the sessionStorage token as a object. The issue is for some reason the parameter of the object isn't working.