internetguru/laravel-user
最新稳定版本:v4.2.4
Composer 安装命令:
composer require internetguru/laravel-user
包简介
Interent Guru Laravel User
README 文档
README
Internet Guru Laravel User is a library that provides seamless integration with various social authentication providers. It stores the user's social identity in the database and allows the user to link multiple social identities to a single account. It also provides temporary login link to the user's email address.
| Branch | Status | Code Coverage |
|---|---|---|
| Main | ||
| Staging | ||
| Dev |
Features and terminology
- Account – application user account.
- Identity – provider & provider_user_id.
- Register – create a new account with a new identity linked to it.
- Connect – link a new identity to the current account.
- Disconnect – unlink an existing identity from the current account.
- Transfer – unlink an existing identity from one account and link it to the current one.
Installation
-
Install the package via Composer:
composer require internetguru/laravel-user
-
Publish the migration files:
php artisan vendor:publish --provider="InternetGuru\LaravelUser\LaravelUserServiceProvider" --tag="ig-user:migrations"
-
Run the migrations:
php artisan migrate
Configuration
Add your social authentication credentials to your .env file:
GOOGLE_CLIENT_ID=your-google-client-id GOOGLE_CLIENT_SECRET=your-google-client-secret GOOGLE_REDIRECT_URI=your-google-redirect-uri FACEBOOK_CLIENT_ID=your-facebook-client-id FACEBOOK_CLIENT_SECRET=your-facebook-client-secret FACEBOOK_REDIRECT_URI=your-facebook-redirect-uri SEZNAM_CLIENT_ID=your-seznam-client-id SEZNAM_CLIENT_SECRET=your-seznam-client-secret SEZNAM_REDIRECT_URI=your-seznam-redirect-uri
Usage Examples
<x-ig-user::buttons action="login" :showRemember="true" /> <x-ig-user::buttons action="login" :showRemember="false" /> <x-ig-user::buttons action="register"/> <x-ig-user::buttons action="connect"/> <a href="{{ route('socialite.action', [ 'provider' => InternetGuru\LaravelUser\Enums\Provider::GOOGLE, 'action' => InternetGuru\LaravelUser\Enums\ProviderAction::DISCONNECT, ]) }}">Disconnect Google</a>
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 2.05k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-07