3. Adding auth APIs
We will add all the backend APIs for auth on /api/auth
. This can be changed by setting the apiBasePath
property in the appInfo
object in the appInfo.js
file. For the rest of this page, we will assume you are using /api/auth
.
pages/api/auth/[[...path]].js
page#
1) Create the - Be sure to create the
auth
folder in thepages/api/
folder. [[...path]].js
will use the middleware exposed bysupertokens-node
which exposes all the APIs like sign in, sign up etc..- An example of this can be found here.
#
2) Expose the SuperTokens APIsPlease fill the form below to see the code snippet (* = Required)
To learn more about what these properties mean read here.
Website Domain:*

This is the URL of your website.
#
3) Use the login widgetIf you are now able to sign in or sign up, this means the backend setup is done correctly! If not, please feel free to ask questions on Discord