PHP code example of socialiteproviders / auth0

1. Go to this page and download the library: Download socialiteproviders/auth0 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/ */

    

socialiteproviders / auth0 example snippets


'auth0' => [
  'client_id' => env('AUTH0_CLIENT_ID'),
  'client_secret' => env('AUTH0_CLIENT_SECRET'),
  'redirect' => env('AUTH0_REDIRECT_URI'),
  'base_url' => env('AUTH0_BASE_URL'),
],

Event::listen(function (\SocialiteProviders\Manager\SocialiteWasCalled $event) {
    $event->extendSocialite('auth0', \SocialiteProviders\Auth0\Provider::class);
});

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

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