Some checks failed
Deploy / Deploy Production (push) Has been skipped
Deploy / Deploy Preview (push) Failing after 1s
Deploy / Cleanup Preview (push) Has been skipped
CI / UI / Build (pull_request) Failing after 13s
CI / Scraper / Lint (pull_request) Successful in 19s
CI / Scraper / Test (pull_request) Successful in 20s
CI / Scraper / Build (pull_request) Successful in 12s
- Add user_sessions PocketBase collection (user_id, session_id, user_agent, ip, created/last_seen) - Extend auth token format to include a per-login authSessionId (4th segment) - Hook validates authSessionId against DB on each request; revoked sessions are cleared immediately - Login/register create a session record capturing user-agent and IP - Profile page shows all active sessions with current session highlighted; per-session End/Sign out buttons - GET /api/sessions and DELETE /api/sessions/[id] endpoints for client-side revocation - Backward compatible: legacy 3-segment tokens pass through without DB check
19 lines
471 B
TypeScript
19 lines
471 B
TypeScript
// See https://svelte.dev/docs/kit/types#app.d.ts
|
|
// for information about these interfaces
|
|
declare global {
|
|
namespace App {
|
|
// interface Error {}
|
|
interface Locals {
|
|
sessionId: string;
|
|
user: { id: string; username: string; role: string; authSessionId: string } | null;
|
|
}
|
|
interface PageData {
|
|
user?: { id: string; username: string; role: string; authSessionId: string } | null;
|
|
}
|
|
// interface PageState {}
|
|
// interface Platform {}
|
|
}
|
|
}
|
|
|
|
export {};
|