PHP code example of tea-software / secure-socialite

1. Go to this page and download the library: Download tea-software/secure-socialite 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/ */

    

tea-software / secure-socialite example snippets




return [
    'whitelist' => [
        'localhost',
        'localhost:3000',
        'yourapp.com',
    ],
];

// Frontend code (JavaScript/Vue/React)
const redirect = encodeURIComponent('https://yourapp.com/auth/callback');
window.location.href = `/auth/social/redirect?provider=google&redirect=${redirect}&nonce=optional_nonce`;
bash
php artisan vendor:publish --provider="SecureSocialite\SecureSocialiteServiceProvider" --tag="config"