Shared authentication packages for BWH Laravel/Vite applications.
This repository contains:
ui: pnpm packagebwh-authfor React auth UI and browser WebAuthn helpers.php: Composer packagebherila/auth-laravelfor Laravel OAuth clients, passkeys, auth services, migrations, routes, and extension contracts. Its manifest is the repository-rootcomposer.json; the source lives underphp/.
The packages intentionally keep app-specific policy outside the shared core. Apps decide whether a user can log in, where they go after login, and how audit events are recorded.
Laravel apps that own their primary /login route must wire package opt-in features into that controller. For example, enabling the audit-log-backed throttle config does not by itself enforce lockout on a custom login controller; the app must call the Laravel package's throttle trait or contract before attempting credentials. See php/README.md.
bwh-auth is published on npm:
pnpm add bwh-authEach consuming app injects its own shadcn/Base UI components into bwh-auth.
bherila/auth-laravel is published on Packagist:
composer require bherila/auth-laravelConsumers do not need a Composer VCS repository entry or a GitHub URI.
The packages version independently:
bwh-auth-v*tags publishbwh-authto npm and create a GitHub Release.v*tags updatebherila/auth-laravelon Packagist.- Release tags must be annotated and signed; publication stops unless GitHub verifies the signature.
To prepare a UI release, run from ui/:
pnpm release patchThe script builds, packs, commits, and pushes the signed release tag. GitHub Actions publishes the package to npm and attaches the tarball to a GitHub Release.
This auth repository is separate from the bwh-ui repository under /Users/bwh/proj/ui.