Token Expiration Value Not Reflected by expiresIn Property
Sep 10, 2025
Overview
One way to check if an existing session is still valid is to access the expiresIn property in the access token. However, when setting the Token expiration (Seconds) found under API -> <specific API> -> Token Settings to a specific value, this value does not get reflected at the time of retrieving the value using React-native SDK.
The SDK used is react-native-auth0 SDK version 2.16
The snippet of code to retrieve the token expiration time is as follows:
const getCreds = async () => {
const creds = await getCredentials();
return creds;
};
const creds = await getCreds();
const tokenExpirationDate = new Date(creds.expiresIn * 1000);
This article explains how to include the Token expiration value.
Applies To
- Token Expiration
- expiresIn Property
Solution