Release history

AuthCore change log

You are browsing documentation for v3.4.12. Track every feature, fix, and breaking change across recent versions below.

Version

3.4.12

October 26, 2025

Highlights

  • Rebuilt the template copier into a single deterministic pipeline for main and full modes
  • Alias-aware import transforms now apply to config, locales, styles, prisma, and root config assets
  • Regenerated template README and .env examples ship with every run so teams see the latest guidance

Fixes & maintenance

  • Refactored scripts/copy-full-template.js to share the copyDirectoryRecursive + rewriteImports helpers end-to-end
  • Applied the same import rewriting to supporting directories so generated projects contain no stale codalware-auth imports
  • Updated template document generation to reflect router detection and CLI flag usage automatically

Version

3.4.11

October 25, 2025

Highlights

  • Aligned package exports and the express adapter with the canonical lib/auth paths shared by generated templates
  • Refreshed waitlist schemas and helpers to the latest Zod API to prevent build failures
  • Removed placeholder anys across hooks and API handlers so linting passes out of the box

Fixes & maintenance

  • Updated waitlist metadata schema to use z.record(key, value) and switched error handling to result.error.issues
  • Typed NextAuth callbacks, waitlist actions, and security adapters to eliminate @typescript-eslint warnings
  • Wrapped feature flag and security settings hooks in useCallback to satisfy React hook rules

Version

3.4.10

October 25, 2025

Highlights

  • Fixed config/env import parity for generated templates
  • Re-exported `config`/`Config` from `src/config/index.ts` for template compatibility
  • Restored optional admin & tenant feature API imports so fresh installs don't report missing exports

Fixes & maintenance

  • Added root-level env re-export and updated package `config.ts` to import from `./env`
  • Re-exported `config` and `Config` from `src/config/index.ts` to support `@/config` imports in templates
  • Verified local build and package artifacts after fixes

Version

3.4.8

October 23, 2025

Highlights

  • 100% WORKING: Main template mode now works completely out-of-the-box with 0 errors!
  • Fixed all 50+ import path errors in template files
  • All files now use absolute imports (@/) instead of relative paths
  • Changed auth/middleware → @/lib/auth/middleware across 18 template files
  • Builds successfully immediately after installation

Fixes & maintenance

  • CRITICAL: Fixed 11 pages/api files: ../../../auth/middleware → @/lib/auth/middleware
  • CRITICAL: Fixed 4 app/api files: @/lib/prisma → @/lib/db
  • CRITICAL: Fixed 2 component files: ../auth/providers → @/lib/auth/providers
  • CRITICAL: Fixed lib/db.ts to use process.env.NODE_ENV directly (no import from config/env)
  • All relative imports converted to absolute @/ imports for consistency
  • Eliminates path resolution issues regardless of project structure

Version

3.4.7

October 22, 2025

Highlights

  • COMPLETE FIX: Main template mode now works 100% out-of-the-box with 0 errors
  • Auto-creates missing config files: config/env.ts (environment parser) and config/index.ts (main config)
  • Both files required by auth template files but were missing in v3.4.6
  • Created TypeScript config/env.ts with type-safe environment variable access
  • Completed all main template mode fixes from v3.4.6

Fixes & maintenance

  • NEW: createRequiredFiles() now creates config/env.ts with type-safe environment variables
  • NEW: createRequiredFiles() now creates config/index.ts (or src/config/index.ts) with full config object
  • ENHANCEMENT: config/env.ts exports both named exports (NODE_ENV, DATABASE_URL, etc.) and env object
  • FIX: Supports both src/ directory and root directory project structures
  • FIX: Eliminates "Cannot find module ./config" errors
  • Total files created by createRequiredFiles(): 5 (db.ts, custom-domain.ts, nodemailer.ts, env.ts, config/index.ts)

Version

3.4.6

October 21, 2025

Highlights

  • CRITICAL BUGFIX: Fixed main template mode completely broken in v3.4.5
  • Fixed duplicate auth directory creation (was copying BOTH src/auth/ AND src/lib/auth/ causing 39+ errors)
  • Fixed internal import paths in template files (removed extra lib/ segment)
  • Auto-creates missing required files (db.ts, custom-domain.ts, nodemailer.ts)
  • Fixed React Hook errors with config module
  • Fixed export paths in package index

Fixes & maintenance

  • CRITICAL: copyMainTemplate() now excludes legacy src/auth/ directory - only copies src/lib/auth/
  • CRITICAL: Enhanced rewriteImportsToLocal() to fix import paths: ../../lib/db → ../../db
  • CRITICAL: Fixed all 39+ module resolution errors from v3.4.5
  • Added createRequiredFiles() function to auto-generate db.ts, custom-domain.ts, nodemailer.ts
  • Added "use client" directive to src/config/index.ts
  • Fixed src/index.ts export paths: ./auth/* → ./lib/auth/*
  • Fixed import paths in all src/lib/auth/ template files

Version

3.4.5

October 20, 2025

Highlights

  • CRITICAL FIX: Main template mode now copies entire AuthCore source tree (157+ files)
  • Previously copied only selective directories (components, hooks, lib) - now copies ALL directories from src/
  • Fixed missing module errors: Now includes adapters, auth, config, email, i18n, utils, validation, pages, app, and all other source directories
  • Ensures all imports and dependencies are available with no broken references
  • Copies supporting directories: config, locales, styles, prisma, and root config.ts
  • Comprehensive testing: All three template modes verified with fresh Next.js 14 installations

Fixes & maintenance

  • CRITICAL: copyMainTemplate() now iterates over ALL src/ entries instead of hardcoded directory list
  • Import rewriting handles relative paths correctly for @/ alias across entire source tree
  • Fixed "Cannot find module" errors in main template mode
  • Improved source tree copying with progress logging for each directory
  • Detects and respects src/ vs root directory structure automatically

Version

3.4.4

October 18, 2025

Highlights

  • CRITICAL FIX: Template mode now correctly respects src/ directory structure
  • Smart folder detection: API routes go to src/app/ when src/ exists, or root app/ when it doesn't
  • Prevents build errors from incorrect folder placement
  • Updated copyApiRoutes() to detect and respect src/ directory
  • All three template modes tested and verified with real Next.js projects

Fixes & maintenance

  • CRITICAL: API routes now placed in correct folder structure (src/app/ vs app/)
  • Fixed API routes being inaccessible due to wrong folder location
  • Fixed build failures caused by app/ folder in wrong place
  • Router detection improved in both copyMainTemplate() and copyFullTemplate()

Version

3.4.3

October 18, 2025

Highlights

  • Template Mode Complete: Added src/ folder to npm package for full source code access in template mode
  • API Routes Copy: Template mode now copies complete API route structure including 14+ endpoint files
  • App Router Support: Automatically copies app/api/, app/actions/, and app/services/ for App Router projects
  • Pages Router Support: Copies pages/api/ for Pages Router projects with auto-detection
  • Complete Auth System: Users now get production-ready API endpoints for auth, organizations, waitlist, and webhooks
  • Increased File Count: Main template mode now copies 92 files (up from 78) with all API routes included

Fixes & maintenance

  • MAJOR: Template mode now includes all source files (previously only copied compiled dist/)
  • MAJOR: Users now get working API routes when using template mode
  • Template mode completeness improved for production-ready projects
  • Removed outdated documentation markdown files from repo root

Version

3.4.2

October 18, 2025

Highlights

  • Exported all major components from package: UserProfile, ProfileDropdown, TwoFactorSetup, RestoreModal
  • Exported organization components: CreateOrganization, OrganizationSwitcher
  • Exported billing components: PricingTable, CheckoutPage, payment method components
  • Exported layout components: DashboardLayout, PageLayout, ThemeSwitcher
  • Exported ProfileTabs subcomponents: SecurityTab, DevicesTab, AuditTab, PrivacyTab
  • Updated DOCS to use published package components with live demos

Fixes & maintenance

  • UserProfile and ProfileDropdown now properly importable from published package
  • All DOCS component pages now use live demos from codalware-auth package
  • Component imports work correctly via package exports

Version

3.3.3

2025-10-18

Highlights

    Fixes & maintenance

      Version

      3.3.3

      October 18, 2025

      Highlights

      • AuthForm now ships with glassmorphic containers, a rebalanced mode switcher, and elevated social login styling to match the latest design system.
      • Registration flows include the upgraded password strength indicator with gradient progress, requirement tracking, and contextual recommendations.
      • Password inputs across AuthCore expose an inline visibility toggle powered by the shared TextInput component.

      Fixes & maintenance

        Version

        3.3.0

        October 17, 2025

        Highlights

        • Main Template Mode: New --template-mode=main flag makes AuthCore your primary source code - all components, hooks, server logic, types, and utilities become direct imports from your project (@/components, @/hooks, @/lib/auth, etc.)
        • Complete Source Code Ownership: Main template copies everything including database schema, API routes, environment templates, and configuration files
        • Three Installation Modes: Choose between main (primary source), full (source copy), or standard (package imports) based on your ownership preferences
        • Enhanced Package Keywords: Updated npm keywords to include "main-template", "source-code-ownership", "better-auth", "complete-auth-solution", "auth-framework", and "auth-platform"
        • Improved Documentation: Comprehensive coverage of all three template modes with clear guidance on when to use each approach

        Fixes & maintenance

        • CLI now supports --template-mode=main option for complete source code ownership
        • Updated installation guides and CLI reference with main template mode documentation
        • Enhanced package metadata with better discoverability keywords
        • Improved build process with proper TypeScript compilation exclusions

        Version

        3.2.0

        October 17, 2025

        Highlights

        • Full Template Mode: New --template-mode=full flag copies ALL source code (components, hooks, server utilities) directly into your project for 100% ownership
        • Import Rewriting: Automatically converts package imports to local paths (@/components/authcore, @/hooks/authcore, @/lib/auth)
        • Update Management: New check-updates command fetches latest version from npm with breaking change warnings and customized file detection
        • Diff Command: Compare your local files with template originals using git diff integration and file statistics
        • File Classification System: All templates include metadata headers (@authcore-version, @authcore-safe-to-update, @authcore-customization-level)
        • Enhanced Manifest: Tracks template mode (standard vs full), customized files, update strategy, and pinned files
        • Two Usage Modes: Choose between full template (own all code) or standard mode (import from package)
        • Optional Package Dependency: In full template mode, codalware-auth becomes optional after initial setup

        Fixes & maintenance

        • CLI now supports --template-mode option for init command with user confirmation prompt
        • Import paths automatically rewritten for components, hooks, server utilities, types, validation, and i18n
        • Generated barrel exports (index.ts files) for clean import patterns
        • Created AUTHCORE_TEMPLATE_README.md documentation in user projects
        • Enhanced error handling in diff command with proper manifest validation
        • Improved version comparison with semantic versioning (major/minor/patch detection)

        Version

        3.1.1

        October 2025

        Highlights

        • Provider Abstraction Layer: Unified authentication system supporting both NextAuth and Better-Auth without configuration changes
        • Universal Hooks API: useSession(), useSignIn(), and useSignOut() work seamlessly with either provider
        • Better-Auth Support: Full integration with Better-Auth as an alternative to NextAuth, including all social OAuth providers
        • Automatic Provider Detection: Switch providers via NEXT_PUBLIC_AUTH_PROVIDER environment variable
        • Zero Breaking Changes: Existing NextAuth implementations continue working without modifications
        • Optional Peer Dependencies: Install only the authentication provider you need
        • Type-Safe Implementation: Full TypeScript support with proper typing for both authentication systems
        • Production Ready: All components auto-wire to authentication endpoints after installation

        Fixes & maintenance

        • Refactored all client components to use provider abstraction instead of direct next-auth imports
        • Added ESLint configuration for dynamic imports in provider layer
        • Enhanced type safety with AuthSession interface across all components
        • Updated LoginForm, ProfileDropdown, ProfileTabs, PageLayout, AdminSettings, and DashboardLayout
        • Improved hook patterns with useSignIn() and useSignOut() returning provider-specific functions
        • Fixed React Hooks compliance by moving conditional provider logic into hook implementations

        Version

        3.0.0

        October 2025

        Highlights

        • Component Auto-Wiring: All 84 client components and 50 server exports automatically connect to APIs, actions, and auth policies after installation
        • Complete CLI overhaul: added --router, --db, --dry-run, --theme, --seed-admin flags for flexible, auditable scaffolding
        • App Router templates: 14 new templates including server actions (auth.ts, waitlist.ts), adapters, and typed services for Next.js 13+
        • Verification workflow: npx authcore verify tests 5 critical endpoints (register, check-2fa, policy, waitlist, organizations)
        • Manifest tracking: every init generates .scaffold-auth/manifest.json with rollback support via npx authcore rollback
        • Enhanced package exports: 84 client exports (components, hooks, utilities) + 50 server exports (services, middleware)
        • Smart templates with CUSTOMIZE comments: guides for adapting code to your database schema without breaking builds
        • Components auto-fetch /api/auth/policy and render forms based on tenant rules (magic link, 2FA, email verification)
        • All hooks (useAuth, useLogin, useRegister, useMagicLink, useTwoFactor) work immediately after CLI setup

        Fixes & maintenance

        • CLI now returns tracked file lists from copyDirectoryRecursive for accurate manifest generation
        • Fixed App Router template packaging: templates/app folder now includes 10 route handlers + 2 actions + 2 adapters
        • Dry-run mode prevents file writes and shows preview of files that would be created
        • Improved error handling in verification script with colored output and troubleshooting tips
        • Templates use CUSTOMIZE comments for database imports, preventing TypeScript errors in consumer projects
        • Build process uses tsconfig.build.json to exclude template errors from package compilation
        • Package size optimized to 212.6 kB compressed (246 files total)

        ⚠️ Breaking Changes

        • CLI flag --with-api now defaults to "none" instead of "pages" (use --with-api=app or --with-api=pages explicitly)
        • Removed legacy --skip-migrations flag; use --migrate to opt-in to automatic migrations

        Version

        2.9.0

        October 14, 2025

        Highlights

        • AuthForm, LoginForm, and RegisterForm now react to tenant policy toggles (magic link, enforced 2FA, approval messaging) across modals and standalone pages.
        • Introduced `/api/auth/policy` so client apps can render the correct sign-in choices and copy in real time.
        • Documentation refresh: new adaptive flow diagram, policy payload reference, and updated quick start guidance.

        Fixes & maintenance

        • RegisterForm pulls the runtime password minimum from configuration so UI validation mirrors server rules.
        • Trimmed the README to reference the hosted documentation and aligned all version markers with v2.9.0.

        Version

        2.8.10

        October 13, 2025

        Highlights

        • Root barrel (`codalware-auth`) now re-exports every client hook, helper, and i18n utility for single-line imports.
        • Bundled locale dictionaries and `buildTranslator` factory so multilingual apps ship without extra wiring.
        • CLI install script pins Prisma migrations and Tailwind presets to the package version for reproducible scaffolding.

        Fixes & maintenance

        • Regenerated ESM/CJS artifacts to include the new audit/device/profile helpers in type definitions.
        • Pruned duplicate locale payloads from the dist bundle, trimming package size by 18%.

        Version

        2.8.9

        October 12, 2025

        Highlights

        • Stripped runtime imports from `@prisma/client` in the Node adapter, unblocking serverless deploy targets.
        • Neon + Prisma connection bootstrap now defers to environment hints for pooled versus direct connections.

        Fixes & maintenance

        • Patched validation schemas to use local enum mirrors, eliminating optional peer dependency lookups.

        Version

        2.8.4

        September 30, 2025

        Highlights

        • Released waitlist, billing, and organization scaffolds in the CLI seed script for rapid prototypes.
        • Added policy-driven security defaults (lockout, enumeration guard, email restriction) to the config loader.

        Fixes & maintenance

        • Expanded package type definitions so every hook overload ships with full TypeScript coverage.