You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ferdi Koomen edited this page Dec 21, 2023
·
1 revision
The OpenAPI generator supports Bearer Token authorization. In order to enable the sending
of tokens in each request you can set the token using the global OpenAPI configuration:
Alternatively, we also support an async method that provides the token for each request.
You can simply assign this method to the same TOKEN property in the global OpenAPI object.
import{OpenAPI}from'./generated';constgetToken=async()=>{// Some code that requests a token...return'SOME_TOKEN';};OpenAPI.TOKEN=getToken;