PHP code example of ericivan / github-oauth2

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

    

ericivan / github-oauth2 example snippets


        'github'=>[
            'client_id' => 'client_id',
            'client_secret' => 'client_secret',
            'redirect_url' => 'redirect_url',
    ]

    Github::with('github')->redirect();

    $user=Github::with('github')->user();