function forgetStoredSession
forgetStoredSession(token: string | undefined): void

Forgets the stored session, but only if it still holds token. Another tab may have replaced it with fresh tokens from a password change, and a 401 for the old token here must not wipe those.

Parameters

token: string | undefined

Return Type

void

Usage

import { forgetStoredSession } from "src/utils/auth/storage.ts";