From e8b9765a34c588c909eb4581e4f96c35dec61cf4 Mon Sep 17 00:00:00 2001 From: elweyn Date: Wed, 10 Nov 2021 06:13:29 +0100 Subject: [PATCH] Withdrew the check on the sessionId when is authorized is called. --- backend/src/graphql/directive/isAuthorized.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/src/graphql/directive/isAuthorized.ts b/backend/src/graphql/directive/isAuthorized.ts index c553539bc..23971162d 100644 --- a/backend/src/graphql/directive/isAuthorized.ts +++ b/backend/src/graphql/directive/isAuthorized.ts @@ -14,13 +14,13 @@ const isAuthorized: AuthChecker = async ( if (context.token) { const decoded = decode(context.token) // if (decoded.sessionId && decoded.sessionId !== 0) { - // const result = await apiGet( - // `${CONFIG.LOGIN_API_URL}checkSessionState?session_id=${decoded.sessionId}`, - // ) - // context.sessionId = decoded.sessionId - context.pubKey = decoded.pubKey - context.setHeaders.push({ key: 'token', value: encode(decoded.pubKey) }) - return true + // const result = await apiGet( + // `${CONFIG.LOGIN_API_URL}checkSessionState?session_id=${decoded.sessionId}`, + // ) + // context.sessionId = decoded.sessionId + context.pubKey = decoded.pubKey + context.setHeaders.push({ key: 'token', value: encode(decoded.pubKey) }) + return true // } } throw new Error('401 Unauthorized')