Skip to main content
The Auth service provides access to the current user’s identity. Unlike vanilla Convex (which returns UserIdentity | null), the Confect Auth service returns an Effect that fails with a typed error when no user is authenticated.

Getting the user identity

getUserIdentity succeeds with the user’s UserIdentity or fails with NoUserIdentityFoundError.

Handling unauthenticated requests

Use Effect.catchTag to handle the case where no user is logged in.

Configuration

Auth provider configuration goes in confect/auth.ts, which is passed through to Convex as-is. See the Convex auth documentation for setup details.