PHP code example of delboy1978uk / bone-social-auth

1. Go to this page and download the library: Download delboy1978uk/bone-social-auth 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/ */

    

delboy1978uk / bone-social-auth example snippets




// use statements here
use Bone\SocialAuth\SocialAuthPackage;

return [
    'packages' => [
        // packages here...,
        SocialAuthPackage::class,
    ],
    // ...
];

return [
    'bone-social-auth' => [
        'callback' => 'https://awesome.scot/user/login/via',
        'providers' => [
            'Twitter' => [
                'enabled' => false,
                'keys' => [
                    'id' => '...',
                    'secret' => '...',
                ]
            ],
            'Google' => [
                'enabled' => true,
                'keys' => [
                    'id' => '...',
                    'secret' => '...',
                ]
            ],
            'Github' => [
                'enabled' => true,
                'keys' => [
                    'id' => '...',
                    'secret' => '...',
                ]
            ],
            'Facebook' => [
                'enabled' => true,
                'keys' => [
                    'key' => '...',
                    'secret' => '...',
                ]
            ],
        ]
    ],
];

return [
    'views' => [
        'boneuser' => 'src/App/View/BoneUser',
    ],
];

<?= $this->socialAuth()