Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions app/settings/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { deleteUserPasskeyCredential, deleteUserSecurityKeyCredential } from "@/
import { globalPOSTRateLimit } from "@/lib/server/request";

import type { SessionFlags } from "@/lib/server/session";
import { revalidatePath } from "next/cache";

const passwordUpdateBucket = new ExpiringTokenBucket<string>(5, 60 * 30);

Expand Down Expand Up @@ -175,6 +176,8 @@ export async function disconnectTOTPAction(): Promise<ActionResult> {
};
}
deleteUserTOTPKey(user.id);

revalidatePath("/settings");
return {
message: "Disconnected authenticator app"
};
Expand Down Expand Up @@ -223,6 +226,8 @@ export async function deletePasskeyAction(_prev: ActionResult, formData: FormDat
message: "Invalid credential ID"
};
}

revalidatePath("/settings");
return {
message: "Removed credential"
};
Expand Down Expand Up @@ -272,6 +277,8 @@ export async function deleteSecurityKeyAction(_prev: ActionResult, formData: For
message: "Invalid credential ID"
};
}

revalidatePath("/settings");
return {
message: "Removed credential"
};
Expand Down