From 759305e4004f3756d065c299a0f4662879db3ddc Mon Sep 17 00:00:00 2001 From: pranalidhanavade <137780597+pranalidhanavade@users.noreply.github.com> Date: Thu, 25 Jul 2024 17:39:51 +0530 Subject: [PATCH] Client id client secret encryption (#726) * fix:client id and secret encryption Signed-off-by: pranalidhanavade * fix: text changes Signed-off-by: pranalidhanavade * fix: env variable changes Signed-off-by: pranalidhanavade --------- Signed-off-by: pranalidhanavade --- .env.sample | 2 +- src/components/Authentication/SignUpUser.tsx | 2 +- src/config/envConfig.ts | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.env.sample b/.env.sample index 0fa73ab29..6b2913778 100644 --- a/.env.sample +++ b/.env.sample @@ -4,7 +4,7 @@ PUBLIC_CRYPTO_PRIVATE_KEY= PUBLIC_SHOW_NAME_AS_LOGO= # Please provide true if you want to give platform name with logo PUBLIC_KEYCLOAK_MANAGEMENT_CLIENT_ID= # Please sepcify your client id -PUBLIC_KEYCLOAK_MANAGEMENT_CLIENT_SECRETE= # Please specify your client secrete +PUBLIC_KEYCLOAK_MANAGEMENT_CLIENT_SECRET= # Please specify your client secrete PUBLIC_PLATFORM_NAME= # Please specify your paltform name PUBLIC_PLATFORM_LOGO= # Please specify your logo file link diff --git a/src/components/Authentication/SignUpUser.tsx b/src/components/Authentication/SignUpUser.tsx index 29510b061..9059f7b87 100644 --- a/src/components/Authentication/SignUpUser.tsx +++ b/src/components/Authentication/SignUpUser.tsx @@ -47,7 +47,7 @@ const SignUpUser = () => { const payload = { email: email, clientId: passwordEncryption(envConfig.PLATFORM_DATA.clientId), - clientSecret:passwordEncryption(envConfig.PLATFORM_DATA.clientSecrete) + clientSecret:passwordEncryption(envConfig.PLATFORM_DATA.clientSecret) } setVerifyLoader(true) diff --git a/src/config/envConfig.ts b/src/config/envConfig.ts index 0b4ff3061..71204908e 100644 --- a/src/config/envConfig.ts +++ b/src/config/envConfig.ts @@ -17,7 +17,7 @@ if (import.meta.env) { } } -const { PUBLIC_BASE_URL, PUBLIC_POLYGON_TESTNET_URL, PUBLIC_POLYGON_MAINNET_URL, PUBLIC_CRYPTO_PRIVATE_KEY,PUBLIC_SHOW_NAME_AS_LOGO, PUBLIC_PLATFORM_NAME, PUBLIC_PLATFORM_LOGO, PUBLIC_POWERED_BY, PUBLIC_PLATFORM_WEB_URL, PUBLIC_POWERED_BY_URL, PUBLIC_PLATFORM_DOCS_URL, PUBLIC_PLATFORM_GIT, PUBLIC_PLATFORM_SUPPORT_EMAIL, PUBLIC_PLATFORM_TWITTER_URL, PUBLIC_KEYCLOAK_MANAGEMENT_CLIENT_ID, PUBLIC_KEYCLOAK_MANAGEMENT_CLIENT_SECRETE, PUBLIC_PLATFORM_SUPPORT_INVITE, PUBLIC_PLATFORM_DISCORD_URL, PUBLIC_ALLOW_DOMAIN }: any = envVariables; +const { PUBLIC_BASE_URL, PUBLIC_POLYGON_TESTNET_URL, PUBLIC_POLYGON_MAINNET_URL, PUBLIC_CRYPTO_PRIVATE_KEY,PUBLIC_SHOW_NAME_AS_LOGO, PUBLIC_PLATFORM_NAME, PUBLIC_PLATFORM_LOGO, PUBLIC_POWERED_BY, PUBLIC_PLATFORM_WEB_URL, PUBLIC_POWERED_BY_URL, PUBLIC_PLATFORM_DOCS_URL, PUBLIC_PLATFORM_GIT, PUBLIC_PLATFORM_SUPPORT_EMAIL, PUBLIC_PLATFORM_TWITTER_URL, PUBLIC_KEYCLOAK_MANAGEMENT_CLIENT_ID, PUBLIC_KEYCLOAK_MANAGEMENT_CLIENT_SECRET, PUBLIC_PLATFORM_SUPPORT_INVITE, PUBLIC_PLATFORM_DISCORD_URL, PUBLIC_ALLOW_DOMAIN }: any = envVariables; export const envConfig = { PUBLIC_BASE_URL: @@ -65,9 +65,9 @@ export const envConfig = { clientId: PUBLIC_KEYCLOAK_MANAGEMENT_CLIENT_ID || import.meta.env.PUBLIC_KEYCLOAK_MANAGEMENT_CLIENT_ID, - clientSecrete: - PUBLIC_KEYCLOAK_MANAGEMENT_CLIENT_SECRETE || - import.meta.env.PUBLIC_KEYCLOAK_MANAGEMENT_CLIENT_SECRETE, + clientSecret: + PUBLIC_KEYCLOAK_MANAGEMENT_CLIENT_SECRET || + import.meta.env.PUBLIC_KEYCLOAK_MANAGEMENT_CLIENT_SECRET, }, PUBLIC_ALLOW_DOMAIN: PUBLIC_ALLOW_DOMAIN || import.meta.env.PUBLIC_ALLOW_DOMAIN } \ No newline at end of file