x96 / socialite-passport
Easy socialite authentication using Laravel passport identity provider.
dev-main
2022-07-04 08:08 UTC
Requires
- php: ^8.0
- doctrine/dbal: ^3.3
- laravel/socialite: ^v5.5.0
- socialiteproviders/laravelpassport: ^4.1.0
Requires (Dev)
- fzaninotto/faker: ^v1.9.2
- orchestra/testbench: ^v6.24.0
- phpunit/phpunit: ^9.5.13
This package is not auto-updated.
Last update: 2025-03-24 21:30:56 UTC
README
This package provides an easy way to authenticate users via a central identity provider that uses Laravel Passport.
Installation
You can install the package via composer:
composer require x96/socialite-passport
Publish the configuration
php artisan vendor:publish --provider="x96\SocialitePassport\SocialitePassportServiceProvider" --tag="config"
Run migration
php artisan migrate
Next, the following environment variables should be added to .env
, where CLIENT_ID
and CLIENT_SECRET
are obtained from the Laravel Passport identity provider.
The REDIRECT_URI
variable will automatically map the correct callback route in the routes file. Therefore, this can be anything you'd like (convention is to use login/[name-of-service]/callback
.
LARAVELPASSPORT_CLIENT_ID=
LARAVELPASSPORT_CLIENT_SECRET=
LARAVELPASSPORT_REDIRECT_URI=/callback
LARAVELPASSPORT_HOST=https://auth.example.com