PHP code example of laravel-uis / socialite-ui

1. Go to this page and download the library: Download laravel-uis/socialite-ui 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/ */

    

laravel-uis / socialite-ui example snippets


Features::rememberSession(),

use SocialiteUI\SocialiteUI;

SocialiteUI::useUserModel(Path\To\Your\User::class);

use SocialiteUI\SocialiteUI;

SocialiteUI::useSocialAccountModel(Path\To\Your\SocialAccount::class);

use SocialiteUI\SocialiteUI;

// Customize how Socialite UI generates the redirect URL for a provider
SocialiteUi::generatesProvidersRedirectsUsing(...);

// Customize how Socialite UI resolves users from Socialite
SocialiteUi::resolvesSocialiteUsersUsing(...);

// Customize how Socialite UI creates users from Socialite
SocialiteUi::createUsersFromProviderUsing(...);

// Customize how Socialite UI creates social accounts from Socialite
SocialiteUi::createSocialAccountsUsing(...);

// Customize how Socialite UI updates social accounts from Socialite
SocialiteUi::updateSocialAccountsUsing(...);

// Customize how Socialite UI handles the `Laravel\Socialite\Two\InvalidStateException` when attempting to resolve a user from Socialite.
SocialiteUi::handlesInvalidStateUsing(...);

// Override the callback logic used by Socialite UI to authenticate users.
SocialiteUi::authenticatesOAuthCallbackUsing(...);

// Customize how Socialite UI handles errors when returning from a failed login attempt from a provider.
SocialiteUi::handlesOAuthCallbackErrorsUsing(...);

// Use a custom prompt your users are shown when they attempt to link a new provider from the "Linked Accounts" screen.
SocialiteUi::promptOAuthLinkUsing(...);