Skip to Content
EnModulesAuthentication

Authentication

The Authentication module provides secure user management, session handling, and OAuth integration using Better Auth .

Overview

  • Location: modules/auth
  • Key Files:
    • client.ts: Client-side auth hooks and utilities.
    • config.ts: Better Auth configuration, including plugins and providers.
    • components/: Auth-related UI components (e.g., forms, buttons).

Configuration

The authentication configuration is defined in modules/auth/config.ts. It manages:

  • Database Adapter: Drizzle adapter for persisting sessions and users.
  • Cookies: Secure cookie handling for sessions.
  • Providers: Email/Password and Social Login providers (e.g., Google).

Usage

Use the client hooks to access session data in your components:

Last updated on