Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Admin Auth Laravel Package

dejwcake/admin-auth

Admin authentication for Laravel. Adds a dedicated admin guard with login, logout, and password handling, plus middleware to protect admin-only routes. Keeps admin sessions separate from regular user sessions so back-office access stays isolated, simple to configure, and easy to drop into existing a...

View on GitHub
Deep Wiki
Context7

dejwcake/admin-auth is a lightweight authentication package for Laravel applications that need a separate login flow for backend or admin users. It provides a dedicated admin guard, ready-to-use login and logout handling, and route middleware so you can protect administrative areas without adopting a full admin framework. Configuration and migrations are publishable, making it easy to adapt to existing user tables or a fresh setup.

  • Dedicated admin guard with configurable provider and driver
  • Built-in login/logout controllers and routes
  • Middleware for guarding admin routes and redirecting guests
  • Simple role and permission checks for access control
  • Publishable config and migrations for quick setup
Frequently asked questions about Admin Auth
How do I install dejwcake/admin-auth in a Laravel app?
Install it with Composer using composer require dejwcake/admin-auth, then let Laravel package discovery register the service provider on Laravel 11 and newer. On older Laravel versions you may need to add the provider manually. The supplied excerpt does not show publish tags or environment variables, so confirm installation and config steps in the README before rollout.
Which Laravel and PHP versions does dejwcake/admin-auth support?
The provided material does not include composer.json version constraints or a full Testbench matrix, so exact PHP and Laravel support is not confirmed. The technical assessment says the dev setup implies a modern, currently supported Laravel matrix, but that is provisional. Check the package composer.json and CI matrix before adopting it.
Does dejwcake/admin-auth provide login, roles, permissions, guards, and middleware?
Yes. The package overview describes authentication and authorization scaffolding for Laravel admin panels, including login handling, role and permission checks, middleware, guards, and configurable views for securing admin routes.
How do I protect admin routes with dejwcake/admin-auth middleware and guards?
Register the package guard and apply its auth and authorization middleware to your admin route group, then verify the middleware order so authentication runs before permission checks. The exact guard name, middleware aliases, and route examples are not shown in the supplied excerpt, so copy them from the README. Test guest, authenticated, and unauthorized requests against the protected routes.
Can I customize the admin login views in dejwcake/admin-auth?
The overview says the package includes configurable views for the admin authentication interface. The supplied excerpt does not show the publish command or view paths, so check the README for vendor:publish tags. After publishing, keep custom login views under version control and retest after package updates.
What changed in dejwcake/admin-auth version 2.0.4?
The 2.0.4 release notes focus on the ApplyUserLocale middleware, which previously ignored non-string user language values and now handles them instead of skipping setLocale. This is a silent behavior change for applications already on 2.x because affected users may start receiving their stored locale instead of the default. Verify enum handling and add a regression test before upgrading.
Does the dejwcake/admin-auth locale middleware work with enum-cast language attributes?
The release notes indicate non-string language attributes are no longer silently skipped, which most likely covers backed enum casts. The assessment warns that it is unspecified whether a string-backed enum is unwrapped to its value or whether an int-backed enum could reach setLocale and cause a type error. Test your exact cast type and locale values in a staging branch.
Is dejwcake/admin-auth safe for production admin panels?
The package is described as scaffolding for admin authentication, so production safety depends on correct guard configuration, route protection, password policy, rate limiting, and any additional controls you require. The technical assessment is provisional because it is based only on release notes, not source review. Review the code, pin a tested version, and monitor updates before using it for sensitive admin panels.
How should I test dejwcake/admin-auth in my Laravel application?
Write feature tests for login success and failure, role and permission enforcement, middleware ordering, and guest redirects on your admin routes. If you use the locale middleware, add coverage for null, string, and enum-cast language attributes. The assessment mentions an Orchestra Testbench-based suite and CI coverage, so mirror those checks for your Laravel version.
What are alternatives to dejwcake/admin-auth for Laravel admin authentication?
Common alternatives include Laravel Breeze or Jetstream for starter authentication, Filament or Backpack for full admin panels, and spatie/laravel-permission for role and permission handling. Compare their Laravel version support, maintenance activity, and authorization features against dejwcake/admin-auth. This package is narrow admin auth scaffolding, so choose based on whether you need a full panel or only guards and middleware.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource