Vibecoded CI/CD
Some checks failed
Build and Deploy Lean / build (push) Failing after 16m44s
Build and Deploy Nuxt / build (push) Failing after 48s

This commit is contained in:
2026-10-06 00:23:17 +02:00
parent a57770619e
commit e2c2c66d7f
79 changed files with 6044 additions and 47 deletions

View File

@@ -3,7 +3,10 @@
A session is a bearer token the API handed us, kept in a cookie rather than
localStorage so the server can see it too: the sidebar then knows who is
signed in on the very first draw, before any script runs. The token itself is
never decoded here — the API is asked who it belongs to (see restoreSession). */
never decoded here — the API is asked who it belongs to (see restoreSession).
In the desktop build the token is kept twice — see keepTokenRemembered, at
the foot of this file. */
export interface AuthUser {
id: string
@@ -34,6 +37,11 @@ export function useAuth() {
maxAge: WEEK_IN_SECONDS,
sameSite: 'lax',
})
/* A window is not owed a cookie jar: its own address is one a webview is not
everywhere obliged to store cookies against, and a session that could not
outlive the window would ask the person to sign in every time they opened
the app. A no-op anywhere else. */
keepTokenRemembered(token, TOKEN_COOKIE)
const user = useState<AuthUser | null>('auth:user', () => null)
const loggedIn = computed(() => user.value !== null)