mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
fix(api): 🚑 Fix OpenID authentication failing because of search params being stripped
This commit is contained in:
parent
4807f3f393
commit
592707658c
3 changed files with 20 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue