SocialiteProviders / SalesForce by m1guelpf

SalesForce OAuth2 Provider for Laravel Socialite
286,307
4
4
Package Data
Maintainer Username: m1guelpf
Maintainer Contact: andy@awendt.com (Andy Wendt)
Package Create Date: 2016-01-11
Package Last Update: 2024-04-01
Home Page: https://socialiteproviders.com/SalesForce/
Language: PHP
License: MIT
Last Refreshed: 2024-04-22 15:00:15
Package Statistics
Total Downloads: 286,307
Monthly Downloads: 8,414
Daily Downloads: 263
Total Stars: 4
Total Watchers: 4
Total Forks: 1
Total Open Issues: 1

SalesForce

composer require socialiteproviders/salesforce

Installation & Basic Usage

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

Add configuration to config/services.php.

'SalesForce' => [    
  'client_id' => env('SALESFORCE_CLIENT_ID'),  
  'client_secret' => env('SALESFORCE_CLIENT_SECRET'),  
  'redirect' => env('SALESFORCE_REDIRECT_URI') 
],

Add provider event listener

Configure the package's listener to the 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\\SalesForce\\SalesForceExtendSocialite@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::with('SalesForce')->redirect();