Skip to content

Commit 04c4d1f

Browse files
committed
Add bloom updates
1 parent b35996c commit 04c4d1f

File tree

4 files changed

+6
-18
lines changed

4 files changed

+6
-18
lines changed

src/shared/modules/auth/common.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,6 @@ export const getCredentialsFromAuthResult = (result, idpId) => {
173173
}
174174

175175
export const temporarlyStoreUrlSearchParams = () => {
176-
const currentBrowserURLParams = getInitialisationParameters()
177-
178176
authLog(
179177
`Temporarly storing the url search params. data: "${JSON.stringify(
180178
currentBrowserURLParams

src/shared/modules/auth/helpers.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,17 @@ export const createCodeChallenge = async (method, codeVerifier) => {
7272
export const addSearchParamsInBrowserHistory = paramsToAddObj => {
7373
if (!paramsToAddObj || !isObject(paramsToAddObj)) return
7474

75-
const crntHashParams = window.location.hash || undefined
7675
const searchParams = new URLSearchParams(window.location.search)
7776
Object.entries(paramsToAddObj).forEach(([key, value]) => {
7877
if (key && value && value.length) {
7978
searchParams.set(key, value)
8079
}
8180
})
8281

83-
const newUrl = `${
84-
window.location.origin
85-
}?${searchParams.toString()}${crntHashParams || ''}`
86-
window.history.replaceState({ path: newUrl }, '', newUrl)
82+
const newUrlSearchParams = new URLSearchParams(cleansedSearchParams)
83+
84+
const newUrl = `${window.location.origin}?${newUrlSearchParams.toString()}`
85+
window.history.replaceState({}, '', newUrl)
8786
}
8887

8988
export const removeSearchParamsInBrowserHistory = paramsToRemove => {

src/shared/modules/auth/helpers.test.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('addSearchParamsInBrowserHistory', () => {
5151
)
5252
})
5353

54-
test('keeps URL hash parameters', () => {
54+
test('does not keep URL hash parameters', () => {
5555
const hashUrlParams = '#code=df56&code_verifier=rt43'
5656
window.history.replaceState(
5757
{},
@@ -62,9 +62,7 @@ describe('addSearchParamsInBrowserHistory', () => {
6262
originalWindowLocationHref + hashUrlParams
6363
)
6464
addSearchParamsInBrowserHistory({ rest: 'test' })
65-
expect(window.location.href).toEqual(
66-
originalWindowLocationHref + '?rest=test' + hashUrlParams
67-
)
65+
expect(window.location.href).toEqual('http://localhost/?code=843cvg')
6866
})
6967
})
7068

src/shared/modules/auth/settings.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ export const searchParamsToRemoveAfterAuthRedirect = [
2121
'session_state',
2222
'code'
2323
]
24-
export const searchParamsToSaveForAfterAuthRedirect = [
25-
'connectURL',
26-
'discoveryURL',
27-
'search',
28-
'perspective',
29-
'run'
30-
]
3124

3225
export const defaultTokenTypePrincipal = 'access_token'
3326
export const defaultTokenTypeAuthentication = 'access_token'

0 commit comments

Comments
 (0)