Flow ID
Your identity and progress across Flow applications.
Flow ID connects your account and progress across Flow apps.
- Sign in and create an account — use email or a passkey.
- Sign in with Bluesky — use an AT Protocol account, and link or disconnect one.
- Use multiple accounts — add, switch, and sign out.
- Account security — inspect sessions and revoke access.
- Export or delete your account — manage your personal data.
- Study and Focus — track practice and meditation.
- Presence and status — set your availability and share your activity.
- Guest sessions — start without signing up, then keep your identity when you create an account.
- XP and Flow Score — understand daily visits, activity rewards, and levels.
- Rooms — find a shared space or create one for your group.
- Character customization — choose and save your appearance.
Set up an integration
The examples in these guides use @flow-industries/id. Your app needs a server route to own its first-party session cookies; loading the browser SDK alone is not enough.
bun add @flow-industries/id viem oxRegister your app's exact origin with the Flow ID issuer before enabling sign-in. The audience is the runtime origin, including scheme and port, with no path. On a server that uses the standard Request and Response APIs, mount the session handler before your other routes:
import { createSessionHandler } from "@flow-industries/id/server";
const session = createSessionHandler({
audience: "https://your-app.example",
});
export async function fetch(request: Request): Promise<Response> {
const handled = await session(request);
if (handled) return handled;
return new Response("Your application routes go here");
}Replace the example audience with your registered app origin. The handler serves /flow/session, including the authorization callback. If you customize that path, configure the same path in the browser and server and register the full callback URL with the issuer.
Initialize the browser SDK once:
import { createFlow } from "@flow-industries/id";
const flow = createFlow();Use createFlow({ autoGuest: true }) instead when you want guest sessions. createFlow() is browser-only; do not call it during server rendering. The default issuer is https://id.flow.industries. For another issuer, configure the server's FLOW_ID_HOST and the browser's host option consistently.
The session handler keeps access and rotating refresh cookies HttpOnly on your app's origin. Use flow.getToken() when an API requires a current bearer token. Never put tokens in navigation URLs or logs. flow.login() navigates to hosted sign-in and returns to the app; read restored state after navigation. For own-account settings, call flow.openAccount() from a user action to open Flow ID in a new tab.
For the complete integration, continue with Getting started, Concepts, and the SDK reference.