Which UI do you use? Pre built UI
Pre built UI
Custom UI
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.
- ReactJS
- Angular
- Vue
// this goes in the auth route config of your frontend app (once the pre built UI script has been loaded)
(window as any).supertokensUIInit("supertokensui", {
    appInfo: {
        appName: "yourAppName",
        apiDomain: "yourApi",
        websiteDomain: "yourWebsite",
        websiteBasePath: "/authentication"
    },
    recipeList: [],
});
import SuperTokens from "supertokens-auth-react";
SuperTokens.init({
    appInfo: {
        appName: "yourAppName",
        apiDomain: "yourApi",
        websiteDomain: "yourWebsite",
        websiteBasePath: "/authentication"
    },
    recipeList: [],
});
// this goes in the auth route config of your frontend app (once the pre built UI script has been loaded)
(window as any).supertokensUIInit("supertokensui", {
    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:
- NodeJS
- GoLang
- Python
- Other Frameworks
Important
For other backend frameworks, you can follow our guide on how to spin up a separate server configured with the SuperTokens backend SDK  to authenticate requests and issue session tokens.
import SuperTokens from "supertokens-node";
SuperTokens.init({
    appInfo: {
        appName: "yourAppName",
        apiDomain: "yourApi",
        websiteDomain: "yourWebsite",
        websiteBasePath: "/authentication"
    },
    recipeList: [],
});
import "github.com/supertokens/supertokens-golang/supertokens"
func main() {
    websiteBasePath := "/authentication"
    supertokens.Init(supertokens.TypeInput{
        AppInfo: supertokens.AppInfo{
            AppName:       "yourAppName",
            APIDomain:     "yourApi",
            WebsiteDomain: "yourWebsite",
            WebsiteBasePath: &websiteBasePath,
        },
    })
}
from supertokens_python import init, InputAppInfo
init(
    app_info=InputAppInfo(
        app_name='yourAppName',
        api_domain='yourApi',
        website_domain='yourWebsite',
        website_base_path='/authentication'
    ),
    
    framework='...', 
    recipe_list=[
      #...
   ]
)