internetguru / laravel-user
Interent Guru Laravel User
v0.10.2
2025-03-14 12:17 UTC
Requires
- php: ^8.0
- internetguru/laravel-common: ^0.6
- internetguru/laravel-model-browser: ^0.6
- laravel/framework: ^9.0 || ^10.0 || ^11.0
- laravel/socialite: ^5.16
- livewire/livewire: ^3.0
- socialiteproviders/manager: ^4.6
Requires (Dev)
- internetguru/laravel-common: ^0.6
- laravel/pint: ^1.17
- laravel/socialite: ^5.16
- livewire/livewire: ^3.5
- orchestra/testbench: ^9.5
- phpunit/php-code-coverage: ^11.0
- socialiteproviders/manager: ^4.6
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="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-auth::buttons action="login" :showRemember="true" /> <x-auth::buttons action="login" :showRemember="false" /> <x-auth::buttons action="register"/> <x-auth::buttons action="connect"/> <a href="{{ route('auth.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.