mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
Merge pull request #5145 from turbo124/v5-develop
Fixes for connected account
This commit is contained in:
commit
5e8646adc9
@ -87,16 +87,7 @@ class ConnectedAccountController extends BaseController
|
||||
|
||||
$google = new Google();
|
||||
|
||||
if(request()->header('X-API-OAUTH-PASSWORD') && strlen(request()->header('X-API-OAUTH-PASSWORD')) >=1){
|
||||
$user = $google->getTokenResponse(request()->header('X-API-OAUTH-PASSWORD'));
|
||||
}
|
||||
else {
|
||||
return response()
|
||||
->json(['message' => 'No valid oauth parameter sent.'], 401)
|
||||
->header('X-App-Version', config('ninja.app_version'))
|
||||
->header('X-Api-Version', config('ninja.minimum_client_version'));
|
||||
}
|
||||
|
||||
$user = $google->getTokenResponse(request()->input('id_token'));
|
||||
|
||||
if (is_array($user)) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user