1. Go to this page and download the library: Download sso-frappe/laravel 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/ */
sso-frappe / laravel example snippets
use Laravel\Socialite\Facades\Socialite;
Route::get('/auth/frappe', fn () => Socialite::driver('frappe')->redirect());
Route::get('/auth/frappe/callback', function () {
$frappeUser = Socialite::driver('frappe')->user();
// Cocokkan user lokal via provider_subject dulu, fallback email.
});