$ account nextauthjs
This is a monorepo for Auth.js (formerly NextAuth.js), a framework-agnostic authentication library for web applications. The core engine (`@auth/core`) handles OAuth/OIDC, email/passwordless, credentials, and WebAuthn/Passkey authentication flows. It provides a unified API for session management (JWT or database-backed), CSRF protection, and cookie handling. The library is designed to be integrated into multiple frameworks via separate packages: `@auth/nextjs`, `@auth/sveltekit`, `@auth/express`, `@auth/qwik`, and `@auth/solid-start`. Each framework package adapts the core `Auth` function to the framework's request/response model, offering server-side handlers, middleware, and client-side hooks. The repository also includes over 80 built-in OAuth/OIDC provider definitions (e.g., Google, GitHub, Discord, Auth0) and 20+ database adapters (e.g., Prisma, Drizzle, MongoDB, PostgreSQL, DynamoDB) that implement a standard `Adapter` interface for user persistence. The project is now part of Better Auth, and the README recommends new projects use Better Auth unless specific feature gaps exist. The monorepo contains development apps, example applications, and a comprehensive documentation site built with Nextra.
This is a SvelteKit application demonstrating authentication using Auth.js. It provides sign-in with multiple providers (Google, GitHub, etc.) and protects a route requiring authentication. The application consists of standard SvelteKit routes, components for UI (header, footer, sign-in button), and centralized authentication configuration in auth.ts. The session is managed via cookies and made available to all pages through a layout load function. The code follows SvelteKit conventions and uses Auth.js's SvelteKit adapter for authentication handling.