Skip to main content
Which frontend SDK do you use?
supertokens-web-js / mobile
supertokens-auth-react

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: [],
});
Which frontend SDK do you use?
supertokens-web-js / mobile
supertokens-auth-react