laravie/authen
Authen is a Laravel authentication package that helps add user login and access control to your application, with a framework-friendly API for configuring authentication and protecting routes and resources.
Install the package and confirm it resolves against your Laravel version — v3.1.0 is the release that added Laravel 10 support, so that's the minimum version to target on a modern app:
composer require laravie/authen:^3.1
php artisan vendor:publish --provider="Laravie\Authen\AuthenServiceProvider"
Pin ^3.1 explicitly. Anything below it predates the Laravel 10 compatibility work and will fight illuminate/* constraints on install.
The first places to look:
vendor/laravie/authen/src/ — find the service provider, any route files, and the config class. This tells you what the package registers and what it expects from your app.config/authen.php (if published) — guards, providers, route prefixes, middleware, and redirect targets usually live here.vendor/laravie/authen/routes/ — confirm which routes it registers and whether they collide with your existing auth scaffolding.composer.json of the package — verify the illuminate/* constraints now include ^10.0, and note the PHP floor it implies (Laravel 10 means PHP 8.1+).A good first use case is a minimal login/logout flow on a fresh Laravel 10 app:
web guard with an Eloquent user provider in config/auth.php (the package builds on this, it doesn't replace it)./auth so it doesn't fight with Breeze/Jetstream defaults.auth-middleware-protected route, and verify session persistence and logout behavior.User model to confirm provider compatibility.Don't build account management on top until the basic guard round-trip is proven.
Use the package as a thin layer over Laravel's native auth, not a parallel system. The value here is reusable flows and routes on top of guards/providers, so keep your config/auth.php as the source of truth and let the package configure around it.
Guard-per-audience pattern. For apps with multiple user types (e.g. users and admins), define separate guards and providers in config/auth.php, then route each through the package's flows with distinct middleware groups and redirect targets. This is the pattern that pays off day-to-day — one package, multiple entry points.
Route group + middleware integration. Register the package routes behind your own middleware group so you control throttling, locale, and CSRF in one place:
Route::middleware(['web', 'throttle:login'])
->prefix(config('authen.prefix', 'auth'))
->group(function () {
// package-provided routes, or your own controllers calling Auth::attempt()
});
Custom user provider as the extension seam. When you need non-Eloquent users (API tokens, external identity, multi-tenant DB), implement a UserProvider and register it in config/auth.php, then let the package's flows resolve through it. This keeps the package untouched and your logic testable.
Container extension. Bind custom implementations (user resolver, post-login redirector, credential validator) in an AppServiceProvider rather than editing vendor code. The package advertises container extensibility — use it as the override mechanism for anything opinionated.
Testing pattern. In feature tests, use $this->actingAs($user, 'web') for protected-route tests, and separately assert the login flow itself with post('/auth/login', [...])->assertRedirect(...). Session regeneration and remember-me are the two behaviors worth explicit assertions. With Laravel 10's PHPUnit 10 default, check the package's own test suite conventions if you plan to contribute.
Integration with existing scaffolding. If Breeze/Jetstream is already installed, either disable its auth routes or point the package at a different prefix. Running two login route sets is the most common source of confusing 302s.
Upgrade path into the Laravel 10 support. If you were already on an older 3.x tag, this release is additive — no config keys or guard semantics changed, just widened framework constraints. Bump the constraint, run composer update laravie/authen, clear caches, and re-run the login round-trip test.
^3.1 and gate any future framework upgrade behind an auth-flow test in CI.Auth::attempt()) if that becomes blocking.config:cache surprises. If you publish config and later change guard/provider settings, always php artisan config:clear in local dev. Stale cached auth config produces "credentials don't match" bugs that look like password issues.php artisan route:list --path=auth after install. Overlapping login/logout URIs silently shadow each other depending on registration order.Auth::attempt() and Auth::logout(), you're fine; if it wraps them, check explicitly — these are security-critical.Auth::guard('web')->getProvider() and the resolved guard config, and check Auth::attempt() return values plus Auth::guard()->getLastAttempted(). Most issues are provider model mismatch or missing password in the credentials array.Hash), rate limiting on login, and redirect validation on intended() URLs before shipping.How can I help you explore Laravel packages today?