feat(oauth): Update OAuth login handling to use callback parameter and improve URL parameter retrieval

This commit is contained in:
web@ppanel
2025-01-22 22:16:04 +07:00
parent 0aa5d5b0a9
commit 9227411d74
4 changed files with 25 additions and 7 deletions
+17
View File
@@ -75,3 +75,20 @@ export function getPlatform(): 'windows' | 'mac' | 'linux' | 'android' | 'ios' |
return 'windows';
}
export function getAllUrlParams() {
const searchParams = new URLSearchParams(window.location.search);
const hashParams = new URLSearchParams(window.location.hash.substring(1));
const params: { [key: string]: string } = {};
for (const [key, value] of searchParams.entries()) {
params[key] = value;
}
for (const [key, value] of hashParams.entries()) {
params[key] = value;
}
return params;
}