Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
revert params change, single line comment
Browse files Browse the repository at this point in the history
  • Loading branch information
avatus committed Jun 29, 2022
1 parent 9b7c401 commit bf5c954
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/teleport/src/AppLauncher/useAppLauncher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit bf5c954

Please sign in to comment.