Skip to content

Commit

Permalink
4: [ART] Tweak var names in return URL fn (#34036)
Browse files Browse the repository at this point in the history
  • Loading branch information
nihil2501 authored Jan 17, 2025
1 parent 4f28052 commit a5d1051
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
const USIP_PATH = '/sign-in';
const USIP_BASE_URL = environment.BASE_URL;

const baseReturnUrl =
const BASE_RETURN_URL =
externalApplicationsConfig[USIP_APPLICATIONS.ARP].externalRedirectUrl;

export const getSignInUrl = ({ returnUrl } = {}) => {
Expand All @@ -22,8 +22,12 @@ export const getSignInUrl = ({ returnUrl } = {}) => {
url.searchParams.set(USIP_QUERY_PARAMS.OAuth, true);

if (returnUrl) {
const returnUrlPrefix = new URL(returnUrl).href.replace(baseReturnUrl, '');
url.searchParams.set(USIP_QUERY_PARAMS.to, returnUrlPrefix);
const returnUrlSuffix = new URL(returnUrl).href.replace(
BASE_RETURN_URL,
'',
);

url.searchParams.set(USIP_QUERY_PARAMS.to, returnUrlSuffix);
}

return url;
Expand Down

0 comments on commit a5d1051

Please sign in to comment.