# Spring boot sample app invalid\_id\_token

**URL:** <https://community.auth0.com/t/spring-boot-sample-app-invalid-id-token/60794>\
**Category:** Get Help\
**Created:** [April 8, 2021, 9:09pm UTC](https://community.auth0.com/t/spring-boot-sample-app-invalid-id-token/60794 "2021-04-08T21:09:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkioseva](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mkioseva/32/25569_2.png) [@mkioseva](https://community.auth0.com/u/mkioseva)\
**Post date:** [April 8, 2021, 9:09pm UTC](https://community.auth0.com/t/spring-boot-sample-app-invalid-id-token/60794/1 "2021-04-08T21:09:29Z")

</div>

Hi,  
I downloaded the sample spring boot app, but when I try to log into it, I get this error:  
[invalid\_id\_token] An error occurred while attempting to decode the Jwt: The ID Token contains invalid claims: {iat=2021-04-08T20:36:33Z}  
The user I try to log in with works on the angular SPA I set up this morning.  
Any idea what the problem might be?

---

<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 8, 2021, 9:31pm UTC](https://community.auth0.com/t/spring-boot-sample-app-invalid-id-token/60794/3 "2021-04-08T21:31:57Z")

</div>

Hi @mkioseva,

Welcome to the Community!

The `iat` claim is the _time the token is issued_. If that is invalid, it is possible that you have a clock skew issue between the issuing server (Auth0) and your spring boot app.

The most obvious solution is to confirm that the server running your spring boot app has the correct time.

Alternatively, you can pass a leeway option when you request the token, and that will allow some variance in server clocks. Here is an example in our SPA 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:** ![mkioseva](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mkioseva/32/25569_2.png) [@mkioseva](https://community.auth0.com/u/mkioseva)\
**Post date:** [April 9, 2021, 2:53pm UTC](https://community.auth0.com/t/spring-boot-sample-app-invalid-id-token/60794/4 "2021-04-09T14:53:50Z")

</div>

That worked! Than you so much!

---

<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 9, 2021, 3:47pm UTC](https://community.auth0.com/t/spring-boot-sample-app-invalid-id-token/60794/5 "2021-04-09T15:47:54Z")

</div>

No problem! Let us know if you have any other quesitons.

---

<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:** [April 24, 2021, 3:48pm UTC](https://community.auth0.com/t/spring-boot-sample-app-invalid-id-token/60794/6 "2021-04-24T15:48:05Z")

</div>

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