Skip to main content

Frontend Integration

Supported frameworks#

1) Install#

npm i -s supertokens-web-js

2) Call the init function#

Call the following init function at the start of your app (ideally on the global scope).

import SuperTokens from 'supertokens-web-js';
import Session from 'supertokens-web-js/recipe/session';

SuperTokens.init({
appInfo: {
apiDomain: "<YOUR_API_DOMAIN>",
apiBasePath: "/auth",
appName: "...",
},
recipeList: [
Session.init(),
],
});
Looking for older version of the documentation?
Which UI do you use?
Custom UI
Pre built UI