diff --git a/src/Auth0Client.ts b/src/Auth0Client.ts index 66be80209..14e958b1a 100644 --- a/src/Auth0Client.ts +++ b/src/Auth0Client.ts @@ -787,11 +787,17 @@ export default class Auth0Client { * const token = await auth0.getTokenSilently(options); * ``` * - * If there's a valid token stored, return it. Otherwise, opens an - * iframe with the `/authorize` URL using the parameters provided - * as arguments. Random and secure `state` and `nonce` parameters - * will be auto-generated. If the response is successful, results - * will be valid according to their expiration times. + * If there's a valid token stored and it has more than 60 seconds + * remaining before expiration, return the token. Otherwise, attempt + * to obtain a new token. + * + * A new token will be obtained either by opening an iframe or a + * refresh token (if `useRefreshTokens` is `true`) + + * If iframes are used, opens an iframe with the `/authorize` URL + * using the parameters provided as arguments. Random and secure `state` + * and `nonce` parameters will be auto-generated. If the response is successful, + * results will be validated according to their expiration times. * * If refresh tokens are used, the token endpoint is called directly with the * 'refresh_token' grant. If no refresh token is available to make this call,