Skip to main content
Which UI do you use?
Custom UI
Pre built UI

API Base Path

Step 1) Back End Change#

The default apiBasePath is /auth. If you don't like that, or if you need to change it to make is similar to your other routes, you can do so by setting the apiBasePath config:

import SuperTokens from "supertokens-node";

SuperTokens.init({
appInfo: {
appName: "yourAppName",
apiDomain: "yourApi",
websiteDomain: "yourWebsite",
apiBasePath: "/api/v3/auth"
},
recipeList: [],
});

Step 2) Front End Change#

You also need to change the apiBasePath in your frontend code:

import SuperTokens from "supertokens-auth-react";

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