JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12
  • Score
    100M100P100Q35702F

Authentication package for Plyaz ecosystem

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@plyaz/auth) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    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 test

    Build

    Compile the library to the dist folder:

    pnpm build

    For a watch mode during development:

    pnpm dev

    Linting & Formatting

    Run the ESLint rules and apply automatic fixes:

    pnpm lint
    pnpm lint:fix

    Check or apply Prettier formatting:

    pnpm format:check
    pnpm format

    Tests

    Execute the test suite once:

    pnpm test

    Watch tests as you work:

    pnpm test:watch

    Generate coverage information:

    pnpm test:coverage

    Relationship 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.