Which UI do you use?
Custom UI
Pre built UI
1. Frontend Setup
Frontend guide. #
1) Finish theapiBasePath
in the appInfo
object #
2) Add The value of apiBasePath
should be "/auth"
. This is because Netlify exposes the serverless functions via /.netlify/functions/*
and we further scope the auth related APIs by adding a , resulting in the above full path.
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 thewebsiteDomain
values will be the same. - An example of this
init
call can be seen here.