# Id\_token was issued in the future (invalid iat)

**URL:** <https://community.auth0.com/t/id-token-was-issued-in-the-future-invalid-iat/61240>\
**Category:** Get Help\
**Tags:** node-auth0, jwt, login\
**Created:** [April 16, 2021, 11:47am UTC](https://community.auth0.com/t/id-token-was-issued-in-the-future-invalid-iat/61240 "2021-04-16T11:47:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vignesh.ramesh](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vignesh.ramesh/32/12799_2.png) [@vignesh.ramesh](https://community.auth0.com/u/vignesh.ramesh)\
**Post date:** [April 16, 2021, 11:47am UTC](https://community.auth0.com/t/id-token-was-issued-in-the-future-invalid-iat/61240/1 "2021-04-16T11:47:48Z")

</div>

Hi Team,

We are using a single page Node.js application in Auth0 and the authentication flow is working fine from our current location (Dublin, Ireland) but we have one of our customer who is located in India and trying to access our application is getting the following error

> “id\_token was issued in the future (invalid iat)”

when the user is trying to login… From our analysis we think this is happening because of the time zone difference but not exactly sure about it and what will be the fix for this issue.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [April 16, 2021, 8:59pm UTC](https://community.auth0.com/t/id-token-was-issued-in-the-future-invalid-iat/61240/3 "2021-04-16T20:59:30Z")

</div>

Hi @vignesh.ramesh,

This is less likely a time zone issue, and more likely a clock skew. The most obvious answer is to have their clock set correctly (this could be as easy as restarting the machine or updating their software).

There is another way to address clock skew. You can pass a `leeway` parameter when you request the token. This will allow for some skew between the auth server and the client.

Here is the doc for passing leeway as a param to the auth0-spa-js SDK.

[https://auth0.github.io/auth0-spa-js/interfaces/auth0clientoptions.html#leeway](https://auth0.github.io/auth0-spa-js/interfaces/auth0clientoptions.html#leeway)

---

<div class="post-metadata">

**Author:** ![vignesh.ramesh](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vignesh.ramesh/32/12799_2.png) [@vignesh.ramesh](https://community.auth0.com/u/vignesh.ramesh)\
**Post date:** [April 19, 2021, 9:10am UTC](https://community.auth0.com/t/id-token-was-issued-in-the-future-invalid-iat/61240/4 "2021-04-19T09:10:23Z")

</div>

Hello @dan.woda

Thanks for providing the solution. I will do the same 🙂

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [April 19, 2021, 5:31pm UTC](https://community.auth0.com/t/id-token-was-issued-in-the-future-invalid-iat/61240/5 "2021-04-19T17:31:49Z")

</div>

Great, let us know how it goes.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [May 4, 2021, 5:32pm UTC](https://community.auth0.com/t/id-token-was-issued-in-the-future-invalid-iat/61240/6 "2021-05-04T17:32:19Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
