Skip to main content

Auth Client

The Auth Client (lib/auth-client.ts) configures the Better Auth client for session management and OAuth flows.

Configuration


Usage

The authClient provides hooks consumed throughout the app:
  • authClient.useSession() — Returns the current session data and loading state
  • authClient.signOut() — Clears the session and redirects to sign-in
  • authClient.signIn.social() — Initiates Google OAuth flow
The session user ID is used to set assigner_id and assignee_id on the task draft when creating new commitments.