fillincode/bee-id

package for authorization via Bee-id

Installs: 244

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

pkg:composer/fillincode/bee-id

1.0.3 2024-02-26 07:30 UTC

This package is auto-updated.

Last update: 2025-09-26 11:05:13 UTC


README

Installation

composer require fillincode/bee-id

Get started

  1. 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'),
        ],
    ];
  2. 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
    });