Skip to content

Commit

Permalink
Include pathname in redirect to fix sso (#1528)
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarDamkjaer authored Sep 15, 2021
1 parent f8eca17 commit 077bb55
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/shared/modules/auth/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ export const addSearchParamsInBrowserHistory = paramsToAddObj => {
}
})

const newUrl = `${
window.location.origin
const newUrl = `${window.location.origin}${
window.location.pathname
}?${searchParams.toString()}${crntHashParams || ''}`
window.history.replaceState({}, '', newUrl)
}
Expand All @@ -121,7 +121,9 @@ export const removeSearchParamsInBrowserHistory = paramsToRemove => {
}
const newUrlSearchParams = new URLSearchParams(cleansedSearchParams)

const newUrl = `${window.location.origin}?${newUrlSearchParams.toString()}`
const newUrl = `${window.location.origin}${
window.location.pathname
}?${newUrlSearchParams.toString()}`
window.history.replaceState({}, '', newUrl)
}

Expand Down

0 comments on commit 077bb55

Please sign in to comment.