Initial Commit
This commit is contained in:
35
app/Http/Controllers/AuthController.php
Normal file
35
app/Http/Controllers/AuthController.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
//use Laravel\Socialite\Contracts\Factory as Socialite;
|
||||
//use Laravel\Socialite\Two\User as SocialiteUser;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
use Socialite;
|
||||
//use SocialiteUser;
|
||||
|
||||
|
||||
class AuthController extends Controller
|
||||
{
|
||||
use AuthenticatesUsers;
|
||||
|
||||
/**
|
||||
* Redirect the user to the Eve Online authentication page.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function redirectToProvider() {
|
||||
return Socialite::driver('eveonline')->redirect();
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain the user information from Eve Online
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function handleProviderCallback(Socialite $social) {
|
||||
$user = $social->driver('eveonline')->user();
|
||||
Auth::login($user);
|
||||
dd($user);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user