dezinger/socialiteproviders-alfaid

AlfaID OAuth2 Provider for Laravel Socialite

v1.0.1 2025-05-29 13:23 UTC

This package is not auto-updated.

Last update: 2025-05-29 13:24:23 UTC


README

composer require dezinger/socialiteproviders-alfaid

Installation & Basic Usage

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

Add configuration to config/services.php

'alfaid' => [    
  'domain' => env('ALFAID_DOMAIN'),
  'domain_api' => env('ALFAID_DOMAIN_API'),  
  'client_id' => env('ALFAID_CLIENT_ID'),  
  'client_secret' => env('ALFAID_CLIENT_SECRET'),  
  'redirect' => env('ALFAID_REDIRECT_URI'),
  'guzzle' => [
    \GuzzleHttp\RequestOptions::CERT => env('ALFAID_PATH_CER'),
    \GuzzleHttp\RequestOptions::SSL_KEY => [
        env('ALFAID_PATH_KEY'),
        env('ALFAID_KEY_PASS')
    ],
  ],
],

Add provider event listener

Configure the package's listener to listen for SocialiteWasCalled events.

Add the event to your listen[] array in app/Providers/EventServiceProvider. See the Base Installation Guide for detailed instructions.

protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        // ... other providers
        \SocialiteProviders\AlfaID\AlfaIDExtendSocialite::class.'@handle',
    ],
];

Usage

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

return Socialite::driver('alfaid')->redirect();

Returned User fields

  • id
  • name
  • email

Expand User fields

...