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();