From 9d9f613496e2add3c05fe7149775b0691256eb1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Herv=C3=A9?= Date: Wed, 20 Sep 2023 16:03:04 +0200 Subject: [PATCH] track org token in run (#2326) --- 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; }