From a552ba58eef8d815f35edeaebae1166d79937d8b Mon Sep 17 00:00:00 2001 From: Victor Ocnarescu <11040206+victorocna@users.noreply.github.com> Date: Fri, 2 Aug 2019 12:56:07 +0300 Subject: [PATCH] Update authEndPoint.js Fix identity instance detection; without it unauthorized users can access the API --- src/lambda/authEndPoint.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lambda/authEndPoint.js b/src/lambda/authEndPoint.js index 0e57a7d..c632d47 100644 --- a/src/lambda/authEndPoint.js +++ b/src/lambda/authEndPoint.js @@ -3,7 +3,7 @@ import fetch from 'node-fetch'; export async function handler(event, context) { - if (!context.clientContext && !context.clientContext.identity) { + if (!context.clientContext || !context.clientContext.identity) { return { statusCode: 500, body: JSON.stringify({