Spring boot sample app invalid_id_token

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?

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

That worked! Than you so much!

1 Like

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

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