Download the PHP package descom/laravel-auth-spa without Composer
On this page you can find all versions of the php package descom/laravel-auth-spa. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download descom/laravel-auth-spa
More information about descom/laravel-auth-spa
Files in descom/laravel-auth-spa
Package laravel-auth-spa
Short Description Template to generate a Laravel Package
License MIT
Informations about the package laravel-auth-spa
Laravel Auth SPA
This package is an authentication backend implementation for Laravel. Registers the routes and controllers required to implement all Laravel authentication features from a Frontend SPA or SSR, including login, password reset, and more.
- Installation
- Configure
- Laravel Sanctum
- Package
- Usage
- Login
- Logout
- Get reset password link
- Reset password with link
- Update password for current user logged
- Customize
- Defining Default Password Rules
- More info
Installation
Configure
Laravel Sanctum
Run:
`
Add Sanctum's middleware to your api middleware group within your application's app/Http/Kernel.php
file:
Configure cors, you need edit the file config/cors.php
and change this lines:
In production define this environment variables:
Local:
Production for domain 'www.app.tld':
Package
You can define your frontend in config file config/authspa.php
Usage
Login
Logout
Get reset password link
Reset password with link
Update password for current user logged
Get user info
Nuxt.js
Install Nuxt Auth:
And configure file nuxt.config.js
:
Customize
Defining Default Password Rules
You may find it convenient to specify the default validation rules for passwords in a single location of your application. You can easily accomplish this using the Password::defaults
method, which accepts a closure. The closure given to the defaults method should return the default configuration of the Password rule. Typically, the defaults
rule should be called within the boot
method of one of your application's service providers: