feat: move jwt to URL hash from search parameters (#14749)

* feat: move jwt to URL hash from search parameters

* fix lint

* comments for future work

* comment format

* fix to use ts-ignore like previous parseURLParams case
This commit is contained in:
Aaron van Meerten
2024-05-16 13:03:12 -05:00
committed by GitHub
parent 7c22bcf827
commit 43ae5915a6
2 changed files with 14 additions and 1 deletions

View File

@@ -537,6 +537,7 @@ export function urlObjectToString(o: { [key: string]: any; }): string | undefine
const search = new URLSearchParams(url.search);
// TODO: once all available versions are updated to support the jwt in the hash, remove this
if (jwt) {
search.set('jwt', jwt);
}
@@ -561,6 +562,14 @@ export function urlObjectToString(o: { [key: string]: any; }): string | undefine
let { hash } = url;
if (jwt) {
if (hash.length) {
hash = `${hash}&jwt=${jwt}`;
} else {
hash = `#jwt=${jwt}`;
}
}
for (const urlPrefix of [ 'config', 'iceServers', 'interfaceConfig', 'devices', 'userInfo', 'appData' ]) {
const urlParamsArray
= _objectToURLParamsArray(