@aura-stack/auth
v0.6.0
Published
Core auth for @aura-stack/auth
Maintainers
Readme
Core authentication library for the Aura Stack ecosystem
Official Docs · Core Package Docs
Overview
@aura-stack/auth provides the core logic and building blocks for authentication and authorization within the Aura Stack ecosystem.
It offers a framework-agnostic, type-safe, and secure solution to handle authentication flows such as OAuth 2.0 and OpenID Connect.
Inspired by Auth.js, Aura Auth focuses on simplicity, developer experience, and strong security practices.
Features
- OAuth 2.0 — Native support for multiple OAuth providers.
- Type-safe by design — First-class TypeScript support with complete type inference.
- Secure sessions — Built-in JWT-based session management with encryption and signing.
- Cookie handling — Secure, configurable cookies for session persistence.
- Extensible architecture — Easily integrate with
@aura-stack/routeror custom routing layers. - Framework-agnostic — Works seamlessly in any environment that supports the Web Request/Response APIs.
Installation
pnpm add @aura-stack/authQuick Start
1. Create Auth Instance
Configure your auth instance in a shared file (e.g., lib/auth.ts).
import { createAuth } from "@aura-stack/auth"
export const auth = createAuth({
oauth: ["github"],
})
export const { api, jose handlers } = auth2. Creat Auth Client Instance
Configure your auth client instance in a shared file (e.g., lib/auth-client.ts).
import { createAuthClient } from "@aura-stack/auth/client"
export const authClient = createAuth({
baseURL: "http://localhost:3000",
})Documentation
Visit the official documentation website.
License
Licensed under the MIT License. © Aura Stack
