The first time login always fail

I am new for Auth0 and I built a SPA website with .net core, Angular 2. I followed the documents using Auth0 for authentication and it works great. But I find when I login, sometimes I need login twice to get it work.
Here is the isAuthenticated() method in my authentication service:
image
I noticed when it fails login, the Date().getTime() > expiresAt:
image

Can anyone help me with that? Why this happened and how to fix that. Thanks

Looks like this might be caused due to your system clock being out of date.

What’s the current value of the JWT Expiration of your application in the Auth0 dashboard?
Do you continue getting the error if you increase the value?
Is your system clock using network sync against a time server?

Thanks a lot for reply. I doubled the JWT Expiration, but it still need to login twice at the first time.
And here is my system Date & time setting:


I don’t know if there is anything wrong. Thank you.

Hey there!

Sorry for such huge delay in response! We’re doing our best in providing you with best developer support experience out there, but sometimes our bandwidth is not enough comparing to the number of incoming questions.

Wanted to reach out to know if you still require further assistance?