Skip to main content

Website Base Path

Step 1) Front End Change#

Since the beginning of this guide, you probably noticed that all the front-end routes for SuperTokens widget are prefixed by /auth. You can change this value in the init function by setting websiteBasePath.

import SuperTokens from "supertokens-auth-react";

SuperTokens.init({
appInfo: {
appName: "yourAppName",
apiDomain: "yourApi",
websiteDomain: "yourWebsite",
websiteBasePath: "/authentication"
},
recipeList: [],
});

Step 2) Back End Change#

You also need to change the websiteBasePath in your backend code:

import SuperTokens from "supertokens-node";

SuperTokens.init({
appInfo: {
appName: "yourAppName",
apiDomain: "yourApi",
websiteDomain: "yourWebsite",
websiteBasePath: "/authentication"
},
recipeList: [],
});
Looking for older version of the documentation?
Which UI do you use?
Custom UI
Pre built UI