Auth0 Home Blog Docs

M2M Token renewal

jwt
auth0
nodejs
#1

I am running a bot application that uses Auth0 authentication. I am seeking clarification on the best way to programmatically update the token if it has 5 days to expire

Check Access Token Expiration
#2

Hey there!

Then I guess what you need to know is the concept of refresh tokens.

Here’s our step by step doc on what are those, how they work and how to implement it:

Hope it will help!

#3

@konrad.sopala is there a way to check validity of an Access Token?

#4

Yep! Here’s more on that:

#5

I need to check how much time it has before expiring

#6

Refer to exp claim that the JWT payload contains.

#7

The exp is always pointing to 24 hours from now. Which is not the actual expiry for the Access Token

#8

I need to know the time remaining in the Access Token and not the ID token or the token for browser flows. Checking the expiry of the token on http://www.jwt.io always returns 24 hours. However, the Access Token for the API should be longer than that. How can I check the expiring date?

#9

I’m merging this one as we don’t want to duplicate topics so that other potentially interested might really easily find answers for what they’re looking. Let’s keep the conversation in this topic.

1 Like
#10

@konrad.sopala Check my previous concern