mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
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:
committed by
GitHub
parent
7c22bcf827
commit
43ae5915a6
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user