Initialisation
#
The init function- Via NPM
- Via Script Tag
import SuperTokens from 'supertokens-website';
SuperTokens.init({
apiDomain: "https://api.example.com"
});
supertokens.init({
apiDomain: "https://api.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.
info
Please see the API Reference for more information on the available config options.