Initialisation
API Reference
The init function:import SuperTokensRequest from 'supertokens-website';
SuperTokensRequest.init("https://api.example.com/api/refresh", 440, true, "example.com", {});
supertokens.fetch.init("https://api.example.com/api/refresh", 440, true, "example.com", {});
- To be called at least once before any http request is made to any of your APIs that require authentication.
- You only need to call this once in your SPA app or on page load.
- Please see the API reference link above to understand the meaning of the various parameters.