mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Update OAuth token on Auth. (#3119)
* Fixes for OAuth * Update token on OAuth login
This commit is contained in:
parent
fb2ca5dbe9
commit
329a9ffb73
@ -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);
|
||||
|
@ -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
|
||||
];
|
||||
|
||||
|
@ -1,6 +1,3 @@
|
||||
@extends('layouts.master', ['header' => $header])
|
||||
|
||||
@section('body')
|
||||
<main class="main">
|
||||
<!-- Breadcrumb-->
|
||||
{{ Breadcrumbs::render('dashboard') }}
|
||||
@ -16,4 +13,3 @@
|
||||
|
||||
</div>
|
||||
</main>
|
||||
@endsection
|
||||
|
Loading…
Reference in New Issue
Block a user