From 89af592e93981e2d65da031ffb807141d46a76ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20J=C3=BCrgen=20Luzgin?= <98516082+jjluzgin@users.noreply.github.com> Date: Sat, 25 Apr 2026 02:19:51 +0200 Subject: [PATCH] docs: add revokeSessionsOnPasswordReset to password reset section (#8551) Co-authored-by: Maxwell <145994855+ping-maxwell@users.noreply.github.com> --- .../docs/authentication/email-password.mdx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/content/docs/authentication/email-password.mdx b/docs/content/docs/authentication/email-password.mdx index e6a9e1365c..9db94d67f2 100644 --- a/docs/content/docs/authentication/email-password.mdx +++ b/docs/content/docs/authentication/email-password.mdx @@ -374,6 +374,22 @@ const { data, error } = await authClient.resetPassword({ ``` +#### Revoking Sessions on Password Reset + +By default, other active sessions are **not** revoked when a user resets their password. To revoke all user sessions on password reset, set `revokeSessionsOnPasswordReset` to `true`: + +```ts title="auth.ts" +export const auth = betterAuth({ + emailAndPassword: { + enabled: true, + revokeSessionsOnPasswordReset: true, // [!code highlight] + sendResetPassword: async ({ user, url, token }, request) => { + // your email sending logic + }, + }, +}); +``` + ### Update password A user's password isn't stored in the user table. Instead, it's stored in the account table. To change the password of a user, you can use one of the following approaches: