From c5444c828ffa6938be4e0f9901fb2f7a970e9aeb Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 13 Jan 2020 10:48:37 +0200 Subject: [PATCH] Fix for OAuth issues --- app/controllers/auth.php | 2 -- app/controllers/shared/api.php | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/controllers/auth.php b/app/controllers/auth.php index 83afc8e3e5..0c8bbab205 100644 --- a/app/controllers/auth.php +++ b/app/controllers/auth.php @@ -433,8 +433,6 @@ $utopia->get('/v1/auth/login/oauth/callback/:provider/:projectId') ->desc('OAuth Callback') ->label('error', __DIR__.'/../views/general/error.phtml') ->label('scope', 'auth') - ->label('abuse-limit', 50) - ->label('abuse-key', 'ip:{ip}') ->label('docs', false) ->param('projectId', '', function () { return new Text(1024); }, 'Project unique ID') ->param('provider', '', function () use ($providers) { return new WhiteList(array_keys($providers)); }, 'OAuth provider') diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 020f8d9adf..fef57029ca 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -8,9 +8,9 @@ use Database\Database; global $utopia, $request, $response, $register, $user, $project; $utopia->init(function () use ($utopia, $request, $response, $register, $user, $project) { - if (is_null($project->getUid()) || Database::SYSTEM_COLLECTION_PROJECTS !== $project->getCollection()) { - throw new Exception('Missing Project UID', 400); - } + // if (is_null($project->getUid()) || Database::SYSTEM_COLLECTION_PROJECTS !== $project->getCollection()) { + // throw new Exception('Missing Project UID', 400); + // } $route = $utopia->match($request);