From ed4aa6d76ac695dc5ef2c747900140ecb72ba180 Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Mon, 15 Oct 2018 22:34:24 -0500 Subject: [PATCH] finally got auth working --- app/AuthAccount.php | 16 ------- app/Http/Controllers/Auth/LoginController.php | 2 +- app/Http/Controllers/AuthController.php | 48 ------------------- ...8_10_06_074929_create_esi_tokens_table.php | 34 ------------- .../2018_10_16_011432_auth_accounts.php | 33 ------------- 5 files changed, 1 insertion(+), 132 deletions(-) delete mode 100644 app/AuthAccount.php delete mode 100644 app/Http/Controllers/AuthController.php delete mode 100644 database/migrations/2018_10_06_074929_create_esi_tokens_table.php delete mode 100644 database/migrations/2018_10_16_011432_auth_accounts.php diff --git a/app/AuthAccount.php b/app/AuthAccount.php deleted file mode 100644 index 8dc4a0715..000000000 --- a/app/AuthAccount.php +++ /dev/null @@ -1,16 +0,0 @@ -belongsTo(User::class); - } -} diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index c7c95d393..261365cde 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -54,7 +54,7 @@ class LoginController extends Controller $user = $this->createOrGetUser($ssoUser); - auth()->login($user); + auth()->login($user, true); return redirect()->to('/dashboard'); } diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php deleted file mode 100644 index 4744fb727..000000000 --- a/app/Http/Controllers/AuthController.php +++ /dev/null @@ -1,48 +0,0 @@ -setScopes(['publicData'])->redirect(); - } - - /** - * Obtain the user information from Eve Online - * - * @return Response - */ - public function handleProviderCallback(AuthAccountService $service) { - $ssoUser = Socialite::driver('eveonline')->user(); - - $user = $service->createOrGetUser($ssoUser); - - auth()->login($user); - - return redirect()->to('/dashboard'); - dd($user); - } - - -} diff --git a/database/migrations/2018_10_06_074929_create_esi_tokens_table.php b/database/migrations/2018_10_06_074929_create_esi_tokens_table.php deleted file mode 100644 index 69be7f229..000000000 --- a/database/migrations/2018_10_06_074929_create_esi_tokens_table.php +++ /dev/null @@ -1,34 +0,0 @@ -string('CharacterId'); - $table->string('AccessToken'); - $table->string('RefreshToken'); - $table->string('ExpiresIn'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('EsiTokens'); - } -} diff --git a/database/migrations/2018_10_16_011432_auth_accounts.php b/database/migrations/2018_10_16_011432_auth_accounts.php deleted file mode 100644 index ea79ad734..000000000 --- a/database/migrations/2018_10_16_011432_auth_accounts.php +++ /dev/null @@ -1,33 +0,0 @@ -integer('user_id'); - $table->string('provider_user_id'); - $table->string('provider'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('auth_accounts'); - } -}