This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dist |
There are many use cases to use getAccessTokenSilently
outside of a component (for example, in an Axios Interceptor or an Apollo Client).
It's tempting to ask for the option to pass an Auth0Client
instance into the Auth0Provider
so that its getTokenSilently
method can used outside of the context of a component, eg.
const client = new Auth0Client();
export const getAccessToken = () => client.getTokenSilently();
OlderNewer