1
0
Fork 0
mirror of synced 2024-06-02 10:54:44 +12:00

Fix for OAuth issues

This commit is contained in:
Eldad Fux 2020-01-13 10:48:37 +02:00
parent 1980cdadba
commit c5444c828f
2 changed files with 3 additions and 5 deletions

View file

@ -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')

View file

@ -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);