@plyaz/auth
v1.0.4
Published
Authentication package for Plyaz ecosystem
Readme
@plyaz/auth
A shared authentication package for the Plyaz ecosystem. This library centralizes core authentication strategies, provider integrations, and access control logic, ensuring that all applications within our monorepo share a single, consistent source of truth for user sessions and permissions.
📦 Installation
pnpm add @plyaz/auth🚀 What's Included
Core Features
- Authentication Strategies - Support for multiple authentication flows, including email/password, social logins, and token-based authentication (JWT, API keys).
- Provider Abstractions - Standardized interfaces for integrating with external providers like Clerk, OAuth services, and other third-party authentication platforms.
- Role-Based Access Control (RBAC) - A robust system for managing user roles and permissions, enabling granular control over application features.
- Session Management - Secure and unified session handling across all Plyaz applications.
- Ecosystem Integration - Seamlessly integrates with @plyaz/types, @plyaz/config, and other shared packages.
Development
Setup
Install dependencies and run the basic checks:
pnpm install
pnpm lint
pnpm testBuild
Compile the library to the dist folder:
pnpm buildFor a watch mode during development:
pnpm devLinting & Formatting
Run the ESLint rules and apply automatic fixes:
pnpm lint
pnpm lint:fixCheck or apply Prettier formatting:
pnpm format:check
pnpm formatTests
Execute the test suite once:
pnpm testWatch tests as you work:
pnpm test:watchGenerate coverage information:
pnpm test:coverageRelationship to Plyaz-Official/types
Type definitions for authentication values, like User, Role, and Permission, live in Plyaz-Official/types. Installing @plyaz/types alongside this package provides strongly typed access to each exported constant and type.
About this repository
This package was scaffolded from the internal package-template and relies on @plyaz/devtools for shared TypeScript, ESLint, Prettier, and Vitest configuration.
