Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify documentation comment for getTokenSilently #874

Merged
merged 4 commits into from
Feb 10, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions src/Auth0Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
jdugan1024 marked this conversation as resolved.
Show resolved Hide resolved
* refresh token.
jdugan1024 marked this conversation as resolved.
Show resolved Hide resolved

* 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.
jdugan1024 marked this conversation as resolved.
Show resolved Hide resolved
*
* 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,
Expand Down