PHP code example of exceed / exauth-oauth

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

    

exceed / exauth-oauth example snippets




namespace Config;

use exAuthOauth\Config\OAuth as OAuthBase;

class OAuth extends OAuthBase
{
    public bool $enabled = true;

    public array $google = [
        'clientId'     => '....apps.googleusercontent.com',
        'clientSecret' => '....',
        'redirectUri'  => 'https://your-app.com/oauth/google/callback',
        'scopes'       => ['openid', 'email', 'profile'],
    ];
}

service('oauth')->oauthRoutes($routes);

<?= view('exAuthOauth\google_button') 
bash
php spark exauth-oauth:publish