From acf57f30ef31a11f536984bcd4f2a46f6bd3942c Mon Sep 17 00:00:00 2001 From: Robert Field Date: Fri, 22 Sep 2023 11:41:40 +0100 Subject: [PATCH] feat: conditionally show token refresh log --- .../composable-cli/src/lib/authentication/get-token.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/composable-cli/src/lib/authentication/get-token.ts b/packages/composable-cli/src/lib/authentication/get-token.ts index d0f6e36f..beecd6db 100644 --- a/packages/composable-cli/src/lib/authentication/get-token.ts +++ b/packages/composable-cli/src/lib/authentication/get-token.ts @@ -40,10 +40,12 @@ export async function getToken( credentials.data.refresh_token ) - console.log( - "CALL WAS MADE TO RENEW TOKEN DID YOU EXPECT THIS? ", - renewedToken - ) + if (process.env.NODE_ENV === "development") { + console.log( + "CALL WAS MADE TO RENEW TOKEN DID YOU EXPECT THIS? ", + renewedToken + ) + } if (!renewedToken.success) { return {