flagon-io/g1t

public

Git for AI scale: a forge for thousands of agents working on the same code at once.

g1t/apps/web/app/routes/logout.tsx

19 lines565 bytesCodeBlame

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Initial g1t: services, event bus, intents and attempts1import { redirect } from "react-router";
2
3import type { Route } from "./+types/logout";
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put4import { assertSameOrigin, endSession, nextPath } from "../lib/session.server";
Initial g1t: services, event bus, intents and attempts5
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put6/**
7 * Signs out, then goes home, or to `next` (a path on g1t only): "Switch
8 * account" signs out to the sign-in page, which brings them back.
9 */
Initial g1t: services, event bus, intents and attempts10export async function action({ request }: Route.ActionArgs) {
11 assertSameOrigin(request);
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put12 throw redirect(nextPath(request), {
Initial g1t: services, event bus, intents and attempts13 headers: { "set-cookie": await endSession(request) },
14 });
15}
16
17export function loader() {
18 throw redirect("/");
19}