Tulip Logo IconTulip
Auth

Session

Read session state through the app auth client and Tulip auth context.

Tulip auth helpers keep the concrete auth client available through React context.

Use AuthProvider near protected app areas and useSession where client UI needs the current session.

Provider

import { AuthProvider } from "@tulip-systems/auth/client";
import { authClient } from "@/server/auth/client";

export function AdminProviders({ children }: { children: React.ReactNode }) {
  return <AuthProvider authClient={authClient}>{children}</AuthProvider>;
}

Continue reading

On this page