Skip to content

algethami/Zid-Provider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zid Provider

composer require algethami/zid-provider

Installation & Basic Usage

Please see the Base Installation Guide, then follow the provider specific instructions below.

Add configuration to config/services.php

'zid' => [
    'client_id' => env('ZID_CLIENT_ID'),
    'client_secret' => env('ZID_CLIENT_SECRET'),
    'redirect' => env('ZID_REDIRECT_URI')
]

Usage

You should now be able to use the provider like you would regularly use Socialite (assuming you have the facade installed):

Route::get('/auth/zid/redirect', function () {
    return Socialite::driver('zid')->redirect();
});

Route::get('/auth/zid/callback', function () {
    /** @var SocialiteProviders\Manager\OAuth2\User $user */
    $user = Socialite::driver('zid')->user();

    dd($user->getRaw());
//     $user['id']
//     $user['store']['title']
});

Returned User fields

  • id
  • nickname
  • name
  • email

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages