From e699e93cfb59eb61b0dd9730f0fb53744277b219 Mon Sep 17 00:00:00 2001 From: Jon Dugan Date: Tue, 8 Feb 2022 20:58:49 -0600 Subject: [PATCH 1/4] clarify documentation comment for getTokenSilently --- src/Auth0Client.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Auth0Client.ts b/src/Auth0Client.ts index 66be80209..82e961d6d 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 eby either opening an iframe or a + * refresh token. + + * 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 valid 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, From 17b7f165817196f10512395885e779dbafef495e Mon Sep 17 00:00:00 2001 From: Jon Dugan Date: Wed, 9 Feb 2022 10:55:09 -0600 Subject: [PATCH 2/4] Update src/Auth0Client.ts Co-authored-by: Steve Hobbs --- src/Auth0Client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Auth0Client.ts b/src/Auth0Client.ts index 82e961d6d..46c8b9140 100644 --- a/src/Auth0Client.ts +++ b/src/Auth0Client.ts @@ -792,7 +792,7 @@ export default class Auth0Client { * to obtain a new token. * * A new token will be obtained eby either opening an iframe or a - * refresh token. + * 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` From 68ef2da0acee7674cd46fa82691a527aa393c54e Mon Sep 17 00:00:00 2001 From: Jon Dugan Date: Wed, 9 Feb 2022 10:55:17 -0600 Subject: [PATCH 3/4] Update src/Auth0Client.ts Co-authored-by: Steve Hobbs --- src/Auth0Client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Auth0Client.ts b/src/Auth0Client.ts index 46c8b9140..48ecfdd9c 100644 --- a/src/Auth0Client.ts +++ b/src/Auth0Client.ts @@ -791,7 +791,7 @@ export default class Auth0Client { * remaining before expiration, return the token. Otherwise, attempt * to obtain a new token. * - * A new token will be obtained eby either opening an iframe or a + * 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 From c2c1e0543be222665aac564c906dfbd81fccd6b1 Mon Sep 17 00:00:00 2001 From: Jon Dugan Date: Wed, 9 Feb 2022 10:55:29 -0600 Subject: [PATCH 4/4] Update src/Auth0Client.ts Co-authored-by: Steve Hobbs --- src/Auth0Client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Auth0Client.ts b/src/Auth0Client.ts index 48ecfdd9c..14e958b1a 100644 --- a/src/Auth0Client.ts +++ b/src/Auth0Client.ts @@ -797,7 +797,7 @@ export default class Auth0Client { * 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 valid according to their expiration times. + * 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,