feat: prefix VITE_ added in conditional auth provider env variable (#3246) (HBE-248)

This commit is contained in:
Mir Arif Hasan
2023-08-08 14:46:13 +06:00
committed by GitHub
parent 085fbb2a9b
commit 2c1fd5d711
4 changed files with 22 additions and 17 deletions

View File

@@ -107,7 +107,7 @@ export const subscriptionContextCookieParser = (rawCookies: string) => {
};
/**
* Check to see if given auth provider is present in the ALLOWED_AUTH_PROVIDERS env variable
* Check to see if given auth provider is present in the VITE_ALLOWED_AUTH_PROVIDERS env variable
*
* @param provider Provider we want to check the presence of
* @returns Boolean if provider specified is present or not
@@ -117,8 +117,8 @@ export function authProviderCheck(provider: string) {
throwErr(AUTH_PROVIDER_NOT_SPECIFIED);
}
const envVariables = process.env.ALLOWED_AUTH_PROVIDERS
? process.env.ALLOWED_AUTH_PROVIDERS.split(',').map((provider) =>
const envVariables = process.env.VITE_ALLOWED_AUTH_PROVIDERS
? process.env.VITE_ALLOWED_AUTH_PROVIDERS.split(',').map((provider) =>
provider.trim().toUpperCase(),
)
: [];