Developer Experience

TypeScript Support

The @ezz-auth/next SDK is built with TypeScript from the ground up, shipping with comprehensive type definitions for a seamless development experience.

Client Hooks

Full type safety for useUser() and useAuth(), providing autocomplete for user profiles and auth states.

Server Helpers

Strictly typed server utilities ensure that currentUser and requireAuth return predictable data structures.

Middleware Config

Interface definitions for authMiddleware help prevent configuration errors at the edge.

Public API Boundaries

Our `index.d.ts` file explicitly defines public exports, ensuring that autocomplete and type safety only expose the intended public API. This prevents accidental reliance on internal logic that may change between versions.