From bf5c95437f3729f17ca161af08863ed824cb19dd Mon Sep 17 00:00:00 2001 From: Michael Myers Date: Mon, 27 Jun 2022 16:20:58 -0500 Subject: [PATCH] revert params change, single line comment --- packages/teleport/src/AppLauncher/useAppLauncher.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/teleport/src/AppLauncher/useAppLauncher.ts b/packages/teleport/src/AppLauncher/useAppLauncher.ts index 484c9c783..bcffaa9a7 100644 --- a/packages/teleport/src/AppLauncher/useAppLauncher.ts +++ b/packages/teleport/src/AppLauncher/useAppLauncher.ts @@ -48,9 +48,7 @@ function resolveRedirectUrl(params: UrlLauncherParams) { const port = location.port ? ':' + location.port : ''; const state = getUrlParameter('state', location.search); const arn = getUrlParameter('awsrole', location.search); - /* - capture and pass any requested App Access path during the `x-teleport-auth` process - */ + // redirectPath captures and pass any requested App Access path during the `x-teleport-auth` process const redirectPath = getUrlParameter('path', location.search); // no state value: let the target app know of a new auth exchange @@ -63,8 +61,8 @@ function resolveRedirectUrl(params: UrlLauncherParams) { if (params.publicAddr) { url.searchParams.set('addr', params.publicAddr); } - if (arn) { - url.searchParams.set('awsrole', decodeURIComponent(arn)); + if (params.arn) { + url.searchParams.set('awsrole', decodeURIComponent(params.arn)); } if (redirectPath) { url.searchParams.set('path', redirectPath);