From 454c82975e24cb59ece08c21dffd7fc976a4d403 Mon Sep 17 00:00:00 2001 From: Balu Babu Date: Fri, 21 Jul 2023 16:17:22 +0530 Subject: [PATCH] chore: added comments to authProviderCheck function in auth/helper.ts --- packages/hoppscotch-backend/src/auth/helper.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/hoppscotch-backend/src/auth/helper.ts b/packages/hoppscotch-backend/src/auth/helper.ts index 4e9968504..d083bc7a8 100644 --- a/packages/hoppscotch-backend/src/auth/helper.ts +++ b/packages/hoppscotch-backend/src/auth/helper.ts @@ -100,6 +100,12 @@ export const subscriptionContextCookieParser = (rawCookies: string) => { export class EmptyClassProvider {} +/** + * Check to see if given auth provider is present in the ALLOWED_AUTH_PROVIDERS env variable + * + * @param provider Provider we want to check the presence of + * @returns Boolean if provider specified is present or not + */ export function authProviderCheck(provider: string) { if (!provider) { throw new Error(AUTH_PROVIDER_NOT_SPECIFIED);