From 671d52468879d60cce6216b4d8f9a1932466349a Mon Sep 17 00:00:00 2001 From: eldadfux Date: Sun, 29 Sep 2019 01:34:35 +0300 Subject: [PATCH] Fixed OAuth bug --- app/controllers/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/auth.php b/app/controllers/auth.php index 073abcab00..96bf3ae644 100644 --- a/app/controllers/auth.php +++ b/app/controllers/auth.php @@ -753,7 +753,7 @@ $utopia->get('/v1/auth/oauth/:provider/redirect') ], ]); - if (empty($user->getUid())) { // Last option -> create user alone, generate random password + if (!$user || empty($user->getUid())) { // Last option -> create user alone, generate random password Authorization::disable(); $user = $projectDB->createDocument([