tarek/fsa
Composer 安装命令:
composer require tarek/fsa
包简介
Full Sanctum Authentication
README 文档
README
FSA Package stands for Full Sanctum Authentication Package
FSA Features:
- Must Verify Email.
- Can Reset Password.
- Socialite Login.
Installation Guide
composer require tarek/fsa
php artisan vendor:publish --provider="Tarek\Fsa\FSAServiceProvider" or php artisan vendor:publish --tag=fsa
php artisan migrate
These credentials should be placed in your application's config/services.php configuration file, depending on the providers your application requires
for Example
'<your-provider>' => [
'client_id' => env('<your-provider>_CLIENT_ID'),
'client_secret' => env('<your-provider>_CLIENT_SECRET'),
'redirect' => env('<your-provider>_REDIRECT'),
],
To reference your <your-provider>_CLIENT_ID and <your-provider>_CLIENT_SECRET and <your-provider>_REDIRECT
you have to adapt your .env file and set your keys and values from your providers
for Example:
GOOGLE_CLIENT_ID=xyz GOOGLE_CLIENT_SECRET=123 GOOGLE_REDIRECT=<your-domain>/api/auth/<your-provider>/callback
Afterwards, include the authentication routes in your route/api.php using:
require __DIR__ . '/Authentication/authentication.php';
Afterwards, Implement the following implementation in your Models/User.php Model using:
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordImplementation;
implements MustVerifyEmail, CanResetPasswordImplementation
Then use Traits
use Illuminate\Auth\Passwords\CanResetPassword;
use Tarek\Fsa\Traits\Providers;
use Tarek\Fsa\Traits\CheckEmailVerifyImplementation;
use Tarek\Fsa\Traits\FsaProfile;
use CanResetPassword, FsaProfile, Providers, CheckEmailVerifyImplementation;
License
The FSA Package is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 22
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-06-24