diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index a3f7e0091b..3d68ca2381 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -280,6 +280,8 @@ class LoginController extends BaseController /* Handle existing users who attempt to create another account with existing OAuth credentials */ if($user = OAuth::handleAuth($socialite_user, $provider)) { + $user->token = $socialite_user->token; + $user->save(); Auth::login($user, true); return redirect($this->redirectTo); @@ -333,6 +335,8 @@ class LoginController extends BaseController if($user = OAuth::handleAuth($socialite_user, $provider)) { + $user->token = $socialite_user->token; + $user->save(); Auth::login($user, true); return redirect($this->redirectTo); diff --git a/app/Libraries/OAuth.php b/app/Libraries/OAuth.php index 66d32a002d..a3b474c16a 100644 --- a/app/Libraries/OAuth.php +++ b/app/Libraries/OAuth.php @@ -130,7 +130,7 @@ class OAuth $oauth_user_id = $this->provider_instance->harvestSubField($payload); $query = [ - 'oauth_user_id' => oauth_user_id, + 'oauth_user_id' => $oauth_user_id, 'oauth_provider_id'=> $this->provider_id ]; diff --git a/resources/views/dashboard/index.blade.php b/resources/views/dashboard/index.blade.php index 5baab4c0e5..2d6da2e34a 100644 --- a/resources/views/dashboard/index.blade.php +++ b/resources/views/dashboard/index.blade.php @@ -1,6 +1,3 @@ -@extends('layouts.master', ['header' => $header]) - -@section('body')
{{ Breadcrumbs::render('dashboard') }} @@ -16,4 +13,3 @@
-@endsection