mirror of
https://github.com/versia-pub/server.git
synced 2025-12-15 20:58:19 +01:00
fix(api): 🚑 Fix OpenID authentication failing because of search params being stripped
This commit is contained in:
parent
4807f3f393
commit
592707658c
3
bun.lock
3
bun.lock
|
|
@ -227,6 +227,9 @@
|
||||||
"msgpackr-extract",
|
"msgpackr-extract",
|
||||||
"protobufjs",
|
"protobufjs",
|
||||||
],
|
],
|
||||||
|
"patchedDependencies": {
|
||||||
|
"openid-client@6.8.1": "patches/openid-client@6.8.1.patch",
|
||||||
|
},
|
||||||
"catalog": {
|
"catalog": {
|
||||||
"@biomejs/biome": "2.3.4",
|
"@biomejs/biome": "2.3.4",
|
||||||
"@bull-board/api": "~6.14.2",
|
"@bull-board/api": "~6.14.2",
|
||||||
|
|
|
||||||
|
|
@ -215,5 +215,8 @@
|
||||||
"zod": "catalog:",
|
"zod": "catalog:",
|
||||||
"zod-openapi": "catalog:",
|
"zod-openapi": "catalog:",
|
||||||
"zod-validation-error": "catalog:"
|
"zod-validation-error": "catalog:"
|
||||||
|
},
|
||||||
|
"patchedDependencies": {
|
||||||
|
"openid-client@6.8.1": "patches/openid-client@6.8.1.patch"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
14
patches/openid-client@6.8.1.patch
Normal file
14
patches/openid-client@6.8.1.patch
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
diff --git a/build/index.js b/build/index.js
|
||||||
|
index 8bea9f9d4413ecf2446ee5130b46e58d5ac37226..b1b9e89c1ac3b6bf6ac82fef94ccf92b55a40321 100644
|
||||||
|
--- a/build/index.js
|
||||||
|
+++ b/build/index.js
|
||||||
|
@@ -888,7 +888,8 @@ export function useIdTokenResponseType(config) {
|
||||||
|
}
|
||||||
|
function stripParams(url) {
|
||||||
|
url = new URL(url);
|
||||||
|
- url.search = '';
|
||||||
|
+ // Remove all params except user_id, link, and flow
|
||||||
|
+ url.search = new URLSearchParams([...url.searchParams].filter(([k]) => ['user_id', 'link', 'flow'].includes(k))).toString();
|
||||||
|
url.hash = '';
|
||||||
|
return url.href;
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue