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.
To require an authenticated user across a whole group of functions β and provide the loaded user to every handler β use middleware instead of repeating the lookup in each handler.
Handling unauthenticated requests
UseEffect.catchTag to handle the case where no user is logged in.
Configuration
Auth provider configuration goes inconfect/auth.ts, which is passed through to Convex as-is. See the Convex auth documentation for setup details.