We're excited to announce that Refresh Token Metadata is now available in Early Access for Enterprise customers.
Refresh Token Metadata allows you to attach custom key-value pairs to refresh tokens, enabling richer context storage and more personalized authentication experiences.
Store Custom Data on Refresh Tokens
You can now attach up to 25 custom key-value pairs to each refresh token. This metadata persists throughout the token's lifecycle and can be accessed or modified via the Management API.
// In Post-Login Action
exports.onExecutePostLogin = async (event, api) => {
api.refreshToken.setMetadata('deviceName', event.request.user_agent);
api.refreshToken.setMetadata('loginRegion', event.request.geoip?.countryCode);
api.refreshToken.setMetadata('orgContext', event.organization?.id);
};
Management API Support
Access and manage refresh token metadata programmatically:
GET /api/v2/refresh-tokens/{id} - Retrieve token with metadataPATCH /api/v2/refresh-tokens/{id} - Update token metadataDELETE /api/v2/refresh-tokens/{id} - Revoke tokenLearn more about Refresh Token Metadata in our documentation
Fetched April 15, 2026