AI Engineering Workspace
PartialChat, files, terminal and preview in one place. Chat sessions run on a durable Postgres-backed queue (chat only: no tools or shell). Live models need an API key; the terminal is unavailable.
Project files
read-only- ..
- apple-touch-icon.png
- brand-guidelines-v2.md
- brand-manifest-v2.json
- favicon-16.png
- favicon-32.png
- favicon-48.png
- favicon.ico
- icon-192.png
- icon-512.png
- maskable-192.png
- maskable-512.png
- source-brand-board.png
- source-crop-icon-fullcolor.png
- source-crop-lockup-dark.png
- source-crop-wordmark-light.png
- zloud-app-icon-1024.png
- zloud-app-icon.svg
- zloud-favicon.svg
- zloud-mark-1024.png
- zloud-mark-512.png
- zloud-mark-mono-512.png
- zloud-mark-mono.svg
- zloud-mark-reversed.svg
- zloud-mark-white-512.png
- zloud-mark-white.svg
- zloud-mark.svg
- zloud-maskable.svg
- zloud-wordmark-dark.svg
- zloud-wordmark-light.svg
- zloud-wordmark-mono.svg
app/src/app/auth/backchannel-logout/route.ts
1import { asSystem, db } from "@/lib/db";2import { audit } from "@/lib/audit";3import { oidcConfig, withKeys } from "@/lib/oidc";4import { verifyLogoutToken } from "@/lib/oidc-core.mjs";5export const dynamic = "force-dynamic";6// OIDC Back-Channel Logout: the IdP (server-to-server) revokes Studio sessions. Authenticated solely by the signed logout token.7export const POST = (req: Request) => asSystem(async () => {8 const cfg = await oidcConfig(); if (!cfg.configured) return Response.json({ error: "not configured" }, { status: 503 });9 const form = await req.formData().catch(() => null); const tok = String(form?.get("logout_token") ?? ""); if (!tok) return Response.json({ error: "logout_token required" }, { status: 400, headers: { "cache-control": "no-store" } });10 try {11 const t = await withKeys(cfg.issuer, k => verifyLogoutToken(tok, k, { issuer: cfg.issuer, clientId: cfg.clientId }));12 const r = await db().prepare("DELETE FROM sessions WHERE idp_iss=? AND ((?::text IS NOT NULL AND idp_sid=?) OR (?::text IS NOT NULL AND user_id IN (SELECT user_id FROM external_identities WHERE issuer=? AND subject=?)))").run(t.iss, t.sid, t.sid, t.sub, t.iss, t.sub);13 await audit("idp", "auth.oidc.backchannel_logout", "", { revoked: r.changes }); return new Response(null, { status: 200, headers: { "cache-control": "no-store" } });14 } catch { return Response.json({ error: "invalid logout token" }, { status: 400, headers: { "cache-control": "no-store" } }); }15});16
Conversation
PartialSign in to start AI sessions.
Task checklist
- Application shell deployed
- Persistent projects
- Agent runtime
- Sandboxed terminal
Execution activity
No agent sessions. Git HEAD 0eebc42 on master.
Approval requests
None pending.