Installation

Install @warpy-auth-sdk/core and set up your first authentication flow in minutes.

Install the Package

Install @warpy-auth-sdk/core using your preferred package manager:

npm install @warpy-auth-sdk/core
yarn add @warpy-auth-sdk/core
pnpm add @warpy-auth-sdk/core
bun add @warpy-auth-sdk/core

Peer Dependencies

@warpy-auth-sdk/core requires the following peer dependencies for full functionality:

Required Dependencies

  • react - For React hooks and components
  • next - For Next.js integration (if using Next.js)

Optional Dependencies

  • @prisma/client - For database adapter support
  • nodemailer - For email magic link functionality
  • ai - For MCP (Model Context Protocol) integration

Note

The package is designed to work with minimal dependencies. Optional features like email magic links and database adapters require additional packages.

Package Structure

@warpy-auth-sdk/core uses subpath exports for optimal tree-shaking:

// Core authentication functions
import { authenticate, getSession, signOut } from '@warpy-auth-sdk/core';

// React hooks and components
import { useAuth, AuthProvider } from '@warpy-auth-sdk/core/hooks';

// Server-side session helpers
import { getServerSession } from '@warpy-auth-sdk/core/hooks/server';

// Next.js integration
import { authMiddleware } from '@warpy-auth-sdk/core/next';

// MCP tools for AI agents
import { createMCPTools } from '@warpy-auth-sdk/core/mcp';

TypeScript Support

@warpy-auth-sdk/core is built with TypeScript and includes comprehensive type definitions. No additional type packages are required.

import type {
  AuthConfig,
  Session,
  Provider,
  Adapter,
  MCPLoginPayload,
  AuthenticateResult,
} from '@warpy-auth-sdk/core';

Environment Requirements

@warpy-auth-sdk/core works with the following environments:

  • Node.js: 18.0.0 or higher
  • React: 18.0.0 or higher
  • Next.js: 13.0.0 or higher (App Router recommended)
  • TypeScript: 4.9.0 or higher

Important

For Next.js 16 Proxy integration, you need Next.js 16.0.0 or higher. The package is optimized for Next.js 16's new features.

Next Steps

Once you've installed the package, you can proceed to the Quickstart guide to set up your first authentication flow.

Installation | @warpy-auth-sdk/core