From 563ea1363cc6f65efa982329bfe9a7345dcd3768 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 13 Jan 2020 09:57:49 +0530 Subject: [PATCH] feat: added abuse checks as per review --- 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 b03891798..253b47847 100644 --- a/app/controllers/auth.php +++ b/app/controllers/auth.php @@ -396,8 +396,8 @@ $utopia->get('/v1/auth/login/oauth/:provider') ->label('sdk.description', '/docs/references/auth/login-oauth.md') ->label('sdk.location', true) ->label('sdk.cookies', true) - // ->label('abuse-limit', 100) - // ->label('abuse-key', 'ip:{ip}') + ->label('abuse-limit', 50) + ->label('abuse-key', 'ip:{ip}') ->param('provider', '', function () use ($providers) { return new WhiteList(array_keys($providers)); }, 'OAuth Provider. Currently, supported providers are: ' . implode(', ', array_keys($providers))) ->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.')