0

I'm integrating identity server with my angular 6 app. I have an issue with angular-oauth2-oidc library which throws me an error about not a valid token, which is valid when I'm checking it by using hasValidAccessToken function then return me true value. Console shows me different status.

https://ibb.co/CVswZ9K

public isValidAccessToken() { return this.oauthService.hasValidAccessToken(); }

yazpid
  • 135
  • 2
  • 18

1 Answers1

2

Having a look at that error message, there are three timestamps:

now: 1547200214894 (GMT: Friday, January 11, 2019 9:50:14.894 AM)
issuedAtMSec: 1547201970000 (GMT: Friday, January 11, 2019 10:19:30 AM)
expiresAtMSec: 1547202270000 (GMT: Friday, January 11, 2019 10:24:30 AM)

The token is not valid as it was issued in the future. Either the server you are getting your token from is in the future, or your machine is in the past.

Mitch Pomery
  • 493
  • 4
  • 14