PHP code example of fillincode / bee-id

1. Go to this page and download the library: Download fillincode/bee-id library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fillincode / bee-id example snippets


    return [
        'bee_id' => [
            'client_id' => env('BEE_ID_CLIENT_ID'),
            'client_secret' => env('BEE_ID_CLIENT_SECRET'),
            'redirect' => env('BEE_ID_REDIRECT_URL'),
        ],
    ];
    

    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
    });