Skip to main content

Disabling APIs

To disable the API entirely, all you need to do is override the api implementation as undefined.

For example, if you want to disable the sign-up and sign-in api, all you do is:

import SuperTokens from "supertokens-node";
import EmailPassword from "supertokens-node/recipe/emailpassword";

SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
recipeList: [
EmailPassword.init({
override: {
apis: (originalImplementation) => {
return {
...originalImplementation,
signUpPOST: undefined,
signInPOST: undefined
}
}
}
})
]
});
important

You then need to define your own routes that will handle this API call. You can see the Frontend driver interface API spec here

Looking for older version of the documentation?
Which UI do you use?
Custom UI
Pre built UI