Download the PHP package codebar-ag/laravel-auth without Composer
On this page you can find all versions of the php package codebar-ag/laravel-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download codebar-ag/laravel-auth
More information about codebar-ag/laravel-auth
Files in codebar-ag/laravel-auth
Package laravel-auth
Short Description This is my package laravel-auth
License MIT
Homepage https://github.com/codebar-ag/laravel-auth
Informations about the package laravel-auth
This package was developed to give you a quick start to authenticate in laravel. It is opinionated and uses the following packages:
💡 What is Laravel Auth?
Laravel Auth is an internal Laravel Nova Authentication replacement to gain more control over authorizing into Laravel Nova.
🛠 Requirements
> = v1.0
- PHP:
^8.2
- Laravel:
^10.*
- Microsoft SSO
⚙️ Installation
You can install the package via composer:
Add the following script to your composer.json
file:
Add configuration to your config/services.php
file:
Add the following environment variables to your .env
file:
⚠️ You need to provide a publicly accessible URL for the MICROSOFT_REDIRECT_URI
environment variable. You can use expose or ngrok for local development.
Add the following trait to your User
model:
Update your App\Http\Middleware\Authenticate
middleware:
Finally, run the following command:
💉 Tests
If you wish to add pest tests, run the following command:
Next add the following to your phpunit.xml
file:
You will also need to add Auth to your Pest.php
file:
🚏 Routes
Below are the following routes provided by this package:
Method | URI | Name | Middleware |
---|---|---|---|
GET | HEAD | /auth/login | auth.login | web |
POST | /auth/login/store | auth.login.store | web |
ANY | /auth/logout | auth.logout | web |
GET | HEAD | /auth/password | auth.request-password | web |
POST | /auth/password/store | auth.request-password.store | web |
POST | /auth/password/reset | auth.reset-password | web |
GET | HEAD | /auth/password/token/{token} | auth.reset-password.store | web |
GET | HEAD | /auth/service/{service} | auth.provider | web |
GET | HEAD | /auth/service/{service}/redirect | auth.provider.redirect | web |
GET | HEAD | /auth/email/verify | auth.verification.notice | web |
GET | HEAD | /auth/email/verify/{id}/{hash} | auth.verification.verify | web |
POST | /auth/email/verification-notification | auth.verification.send | web |
🪐 Nova Adjustments
Add the user menu for logout to your NovaServiceProvider
boot method:
Next in your nova.php
config add the following:
Next in your NovaServiceProvider
replace the routes method with the following:
Note: you can not
register routes for ->withAuthenticationRoutes()
or ->withPasswordResetRoutes()
as this will override the changes we made in the nova.php
config to routes.
🔧 Configuration file
You can publish the config file with:
This is the contents of the published config file:
🔐 Verify
If you wish to use email verification, you can add the following to your User
model:
Then you can use the following middleware to protect your routes:
You use verification in nova, add the middleware into in your nova.php
config:
🎨 Customisation
You can publish the views using:
You can publish the assets using:
You can publish the config using:
You can publish the migrations using:
You can publish the translations using:
This package uses Laravel Honeypot to prevent spam.Check out the documentation to learn how to customise it.
🚧 Testing
Copy your own phpunit.xml-file.
Run the tests:
📝 Changelog
Please see CHANGELOG for more information on what has changed recently.
✏️ Contributing
Please see CONTRIBUTING for details.
🧑💻 Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
🙏 Credits
- Rhys Lees
- All Contributors
- Skeleton Repository from Spatie
- Laravel Package Training from Spatie
🎭 License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-auth with dependencies
illuminate/contracts Version ^10.0
laravel/socialite Version ^5.11
socialiteproviders/microsoft Version ^4.2
spatie/laravel-package-tools Version ^1.16
spatie/laravel-flash Version ^1.9
spatie/laravel-activitylog Version ^4.7
spatie/laravel-honeypot Version ^4.4