From 356946e635a799fa376cbaf6891ffb5ec6a014c7 Mon Sep 17 00:00:00 2001 From: Kevin Yue Date: Fri, 1 Sep 2023 09:28:44 +0800 Subject: [PATCH] refactor: redact the gateway address --- gpgui/src/atoms/loginGateway.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gpgui/src/atoms/loginGateway.ts b/gpgui/src/atoms/loginGateway.ts index 4d79c40..1ff8adb 100644 --- a/gpgui/src/atoms/loginGateway.ts +++ b/gpgui/src/atoms/loginGateway.ts @@ -1,6 +1,7 @@ import { atom } from "jotai"; import gatewayService from "../services/gatewayService"; import logger from "../utils/logger"; +import { redact } from "../utils/redact"; import { isProcessingAtom, statusAtom } from "./status"; import { connectVpnAtom } from "./vpn"; @@ -20,7 +21,7 @@ export const loginGatewayAtom = atom( set(statusAtom, "gateway-login"); let token: string; try { - logger.info(`Logging in to gateway ${gateway}...`); + logger.info(`Logging in to gateway ${redact(gateway)}...`); token = await gatewayService.login(gateway, credential); } catch (err) { throw new Error("Failed to login to gateway");