wuwx/laravel-socialite-neuqids

v2.0.0 2020-04-10 10:40 UTC

This package is auto-updated.

Last update: 2024-12-10 20:38:24 UTC


README

composer require wuwx/laravel-socialite-neuqids

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