fillincode / bee-id
package for authorization via Bee-id
1.0.3
2024-02-26 07:30 UTC
Requires
- laravel/socialite: ^5.8
README
Installation
composer require fillincode/bee-id
Get started
-
After installing the package, you need to add data to connect to the authorization service in the config/services.php file
return [ 'bee_id' => [ 'client_id' => env('BEE_ID_CLIENT_ID'), 'client_secret' => env('BEE_ID_CLIENT_SECRET'), 'redirect' => env('BEE_ID_REDIRECT_URL'), ], ];
-
Add routes for authorization
use Laravel\Socialite\Facades\Socialite; Route::get('/auth/redirect', function () { return Socialite::driver('bee_id')->redirect(); }); Route::get('/auth/callback', function () { /** @var \Fillincode\BeeId\User $user */ $user = Socialite::driver('bee_id')->user(); // $user->token });