When a 401/expired-token fires in client.ts or file.ts, the handlers were
clearing localStorage but not the Pinia auth.token ref. The route guard
reads Pinia, so router.push('/login') was immediately bounced back to
/dashboard, leaving the user in a ghost-authenticated state where all API
calls failed with 401.
Calling auth.logout() clears both Pinia state and localStorage atomically,
so the route guard correctly allows the redirect to /login.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| src | ||
| auto-imports.d.ts | ||
| components.d.ts | ||
| index.html | ||
| package.json | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.d.ts | ||
| vite.config.ts | ||