Skip to main content

Doing operations post a password reset

To perform any task like analytics, sending a user an email, notifying an internal dashboard, post resetting a password, you'll need to override the passwordResetPOST API.

import SuperTokens from "supertokens-node";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
import Session from "supertokens-node/recipe/session";

appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
recipeList: [
override: {
apis: (originalImplementation) => {
return {
passwordResetPOST: async function(input) {

if (originalImplementation.passwordResetPOST === undefined) {
throw Error("Should never come here");

// First we call the original implementation
let response = await originalImplementation.passwordResetPOST(input);

// Then we check if it was successfully completed
if (response.status === "OK") {
// TODO: post password reset logic
return response;
Looking for older versions of the documentation?
Which UI do you use?
Custom UI
Pre built UI