Download the PHP package mpyw/scoped-auth without Composer
On this page you can find all versions of the php package mpyw/scoped-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mpyw/scoped-auth
More information about mpyw/scoped-auth
Files in mpyw/scoped-auth
Package scoped-auth
Short Description Apply specific scope for user authentication.
License MIT
Informations about the package scoped-auth
Scoped Auth
Apply specific scope for user authentication.
Requirements
- PHP:
^8.2
- Laravel:
^11.0 || ^12.0
[!NOTE] Older versions have outdated dependency requirements. If you cannot prepare the latest environment, please refer to past releases.
Installing
Via Composer
For Fortify users
[!WARNING] Default Fortify's
RedirectIfTwoFactorAuthenticatable
implementation directly uses internalModel
underUserProvider
, however, the Laravel author won't be willing to fix it for whatever reason. So we need to configure Fortify like this:
CustomFortifyAuthenticator.php
AuthServiceProvider.php
[!NOTE] Re-submitted PR laravel/fortify#582 has been already merged, but it's not released yet at 2025-03-05. Once it's released, you can remove this workaround.
Testing
Via PHPUnit
Usage
Implement AuthScopable contract on your Authenticatable Eloquent Model.
Note that you can reuse another existing scope.
As a by-product, you can also run scope queries based on the standard Eloquent way.
Standards
Credits
- mpyw
- All Contributors
License
Licensed under the MIT License. See License File for more information.
All versions of scoped-auth with dependencies
illuminate/auth Version ^11.0 || ^12.0 || ^13.0
illuminate/database Version ^11.0 || ^12.0 || ^13.0
illuminate/contracts Version ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^11.0 || ^12.0 || ^13.0