From 8c248b78f34e5e29cbd13eec848e2fc732239bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Herv=C3=A9?= Date: Wed, 20 Sep 2023 15:12:36 +0200 Subject: [PATCH] track org token in run --- projects/optic/src/commands/run.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/projects/optic/src/commands/run.ts b/projects/optic/src/commands/run.ts index ae576e003d..fd8973c967 100644 --- a/projects/optic/src/commands/run.ts +++ b/projects/optic/src/commands/run.ts @@ -198,13 +198,10 @@ async function authenticateInteractive(config: OpticCliConfig) { config.isAuthenticated = true; config.userId = token.startsWith('opat') ? token.slice(4).split('.')[0] - : undefined; + : token; - if (config.userId) { - alias(config.userId); - trackEvent('cli.login'); - await flushEvents(); - } + trackEvent('cli.login'); + await flushEvents(); return true; }