Skip to main content

If you are using our backend SDK that is lesser than the following versions, please visit the older documentation link here.

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 versions of the documentation?
Which UI do you use?
Custom UI
Pre built UI