You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Optionally override the default access token TTL to match the upstream token
247
+
accessTokenTTL: upstreamTokens.expires_in
246
248
};
247
249
}
248
250
}
@@ -253,8 +255,11 @@ The callback can:
253
255
- Return both `accessTokenProps` and `newProps` to update both
254
256
- Return only `accessTokenProps` to update just the current access token
255
257
- Return only `newProps` to update both the grant and access token (the access token inherits these props)
258
+
- Return `accessTokenTTL` to override the default TTL for this specific access token
256
259
- Return nothing to keep the original props unchanged
257
260
261
+
The `accessTokenTTL` override is particularly useful when the application is also an OAuth client to another service and wants to match its access token TTL to the upstream access token TTL. This helps prevent situations where the downstream token is still valid but the upstream token has expired.
262
+
258
263
The `props` values are end-to-end encrypted, so they can safely contain sensitive information.
0 commit comments