wuwx/laravel-socialite-neupass

v5.0.1 2024-05-29 00:17 UTC

This package is auto-updated.

Last update: 2024-10-29 01:42:19 UTC


README

composer require wuwx/laravel-socialite-neupass

<?php
use Laravel\Socialite\Facades\Socialite;
class LoginController extends Controller
{
    public function showLoginForm()
    {
        return redirect()->route("login.neupass");
    }
    public function redirectToProvider()
    {
        return Socialite::driver('neupass')
                        ->redirectUrl(request()->getUri() . "/callback")
                        ->redirect();
    }
    public function handleProviderCallback()
    {
        $user = Socialite::driver('neupass')->user();
    }
}
Route::get('login/neupass', 'Auth\LoginController@redirectToProvider')->name("login.neupass");
Route::get('login/neupass/callback', 'Auth\LoginController@handleProviderCallback')->name("login.neupass.callback");