Files
Momento/memento-note/lib/auth-client.ts
Antigravity db175ebff6
Some checks failed
CI / Lint, Test & Build (push) Failing after 7m49s
CI / Deploy production (on server) (push) Has been cancelled
fix(auth): revoke JWT on logout and harden Google sign-in
Logout now increments sessionVersion so existing JWTs are rejected
server-side, deletes orphaned DB sessions, and uses redirectTo for signOut.
Google OAuth requests account selection each time; optional AUTH_GOOGLE_PROMPT=login
forces Google re-authentication on shared devices.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-17 17:29:51 +00:00

9 lines
252 B
TypeScript

'use client';
import { signOut } from 'next-auth/react';
/** Ends the Momento session server-side (JWT revoked) and redirects to login. */
export async function performSignOut(callbackUrl = '/login') {
await signOut({ redirectTo: callbackUrl });
}