# @baseplate-dev/plugin-auth

This plugin provides authentication capabilities for Baseplate projects, including both local authentication and Better Auth integration.

## Purpose

The plugin-auth package provides:

- Multiple authentication strategies (local auth and Better Auth)
- User session management via cookies
- Role-based access control (RBAC)
- Authentication UI components
- Backend authentication middleware
- User management interfaces

## Features

- **Local Authentication**: Email/password authentication with session management
- **Better Auth Integration**: Full Better Auth authentication flow with callback handling
- **Role Management**: Define and manage user roles and permissions
- **Session Handling**: Secure cookie-based sessions with CSRF protection
- **React Components**: Pre-built authentication UI components
- **GraphQL Integration**: Authentication queries and mutations

## Part of Baseplate Monorepo

This package is part of the Baseplate monorepo and extends Baseplate projects with comprehensive authentication functionality.
