Skip to main content
Version: 8.2.X

Initialisation

The init function#

import SuperTokens from 'supertokens-website';

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.

Which frontend SDK do you use?
supertokens-web-js / mobile
supertokens-auth-react