Skip to main content

1. Frontend Setup

What type of UI are you using?

1. Finish the Frontend guide.

2. Add apiBasePath in the appInfo object

App Info

Adjust these values based on the application that you are trying to configure. To learn more about what each field means check the references page.
This is the URL of your app's API server.
This is the URL of your app's API server.
SuperTokens will expose it's APIs scoped by this base API path.
This is the URL of your website.
The path where the login UI will be rendered

So the init function call should look like:

import SuperTokens from "supertokens-auth-react";

SuperTokens.init({
appInfo: {
appName: "<YOUR_APP_NAME>",
apiDomain: "<YOUR_API_DOMAIN>",
websiteDomain: "<YOUR_WEBSITE_DOMAIN>",
apiBasePath: "/auth",
websiteBasePath: "/auth"
},
recipeList: []
});
  • If you are hosting the frontend via Netlify as well, then the apiDomain and the websiteDomain values will be the same.
  • An example of this init call can be seen here.