xver/php-auth-core
A lightweight PHP authentication core for Laravel providing reusable login, credential verification, password hashing, session and token handling, plus guard helpers. A small foundation for building custom auth flows without pulling in a full auth stack.
composer require xver/php-auth-core then immediately commit the exact version. Check composer.json in the package for PHP and framework constraints before assuming it fits your runtime.vendor/xver/php-auth-core/: read README.md if present, composer.json, src/, and any tests/. The public API is whatever the source exposes.bin/console config:dump-reference xver_auth_core (or the likely bundle name) and bin/console debug:container xver. If it is a plain library, you will wire its services yourself; if it ships a bundle, let Flex/recipe registration do the work.KernelTestCase (or a small script) that instantiates the core auth service, passes a known credential, and asserts success and failure. This proves the package works in your environment and reveals its expected inputs/outputs.#[Autowire] for scalar config such as token TTL or a pepper if the package expects constructor arguments.#[MapRequestPayload], validate it, call the auth service, then regenerate the session or issue a token. Return 204/token payload from the controller, not from the package.AuthenticatorInterface or LoginService that delegates to xver/php-auth-core. This keeps your application code stable if the package is abandoned or replaced, which is likely given its maturity signals.WebTestCase for the HTTP login path and KernelTestCase for service-level checks. Assert failure paths (wrong password, unknown user, expired token) as well as success. If Symfony TestPack is missing, install it with composer require symfony/test-pack.#[AsEventListener] for audit logging and lockout counters. Avoid modifying vendor code; decorate services or listen to events instead.%env(...)% and .env.local; do not hard-code peppers or signing keys in services.yaml.debug:* commands) but not as an API reference. The real API lives under vendor/.bin/console debug:autowiring <ClassName> and debug:container <service>. Add aliases or tags explicitly only after checking whether the package expects them.config/bundles.php if a Flex recipe exists. If no recipe exists, register the bundle manually only after confirming it is a bundle and not a plain library.Secure/HttpOnly/SameSite flags, login rate limiting (symfony/rate-limiter), and token expiration/rotation. Do not assume the package handles all of these.composer why-not xver/php-auth-core <version> if you hit conflicts, and test on the same PHP version as production. Use devbox run -- php -v / devbox run -- php bin/phpunit if the host lacks PHP.var/log/dev.log, use /_profiler, and run bin/console lint:container after wiring. A container lint failure is faster to diagnose than a runtime auth failure.How can I help you explore Laravel packages today?