See the Authentication section for more information on how to use the Access Token Provider.

<AccessTokenProvider fetchToken={fetchToken}>
  // Components
</AccessTokenProvider>

Props API

fetchToken
() => Promise<string>

Function that the provider will use to fetch the access token.

accessToken
string

If passed, the provider will ignore the fetchToken function and pass this access token to all the children components.