From aba830ee7bcbdc04bad65831ad105307ccfaeaa7 Mon Sep 17 00:00:00 2001 From: eldadfux Date: Sun, 13 Oct 2019 23:30:46 +0300 Subject: [PATCH] OAuth callbacks are required --- app/controllers/auth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/auth.php b/app/controllers/auth.php index 904a89277a..4e1fbed3de 100644 --- a/app/controllers/auth.php +++ b/app/controllers/auth.php @@ -601,8 +601,8 @@ $utopia->get('/v1/auth/oauth/:provider') ->label('abuse-limit', 50) ->label('abuse-key', 'ip:{ip}') ->param('provider', '', function () use ($providers) { return new WhiteList(array_keys($providers)); }, 'OAuth Provider') - ->param('success', '', function () use ($clients) { return new Host($clients); }, 'URL to redirect back to your app after a successful login attempt.', true) - ->param('failure', '', function () use ($clients) { return new Host($clients); }, 'URL to redirect back to your app after a failed login attempt.', true) + ->param('success', '', function () use ($clients) { return new Host($clients); }, 'URL to redirect back to your app after a successful login attempt.') + ->param('failure', '', function () use ($clients) { return new Host($clients); }, 'URL to redirect back to your app after a failed login attempt.') ->action( function ($provider, $success, $failure) use ($response, $request, $project) { $callback = $request->getServer('REQUEST_SCHEME', 'https').'://'.$request->getServer('HTTP_HOST').'/v1/auth/oauth/callback/'.$provider.'/'.$project->getUid();