Skip to content

Commit 366ec16

Browse files
committed
feat: add support for url params
1 parent 0df7fae commit 366ec16

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/lib/utils/index.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,24 @@ export const parseSearchParamsToObject = (search: string) => {
2929
for (const param of searchParams.entries()) {
3030
paramsObject[param[0]] = param[1];
3131
}
32+
paramsObject.authUrlParams = Object.assign({ ...paramsObject });
33+
34+
Object.keys(paramsObject).forEach((key) => {
35+
if (
36+
![
37+
"start_page",
38+
"is_create_org",
39+
"response_type",
40+
"org_name",
41+
"org_code",
42+
"state",
43+
"post_login_redirect_url",
44+
"authUrlParams",
45+
].includes(key)
46+
) {
47+
delete paramsObject[key];
48+
}
49+
});
3250

3351
return paramsObject;
3452
};

0 commit comments

Comments
 (0)