Fix for OAuth issues
This commit is contained in:
parent
1980cdadba
commit
c5444c828f
|
@ -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')
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue