Skip to content

Commit 34d7aed

Browse files
committed
fix: query params did not match E-Signet redirect_uri
1 parent 88a1423 commit 34d7aed

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/client/src/v2-events/hooks/useSystemVariables.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ export function useSystemVariables() {
2222
const variables = {
2323
$user: user,
2424
$window: {
25-
location: pick(window.location, ['href', 'pathname', 'hostname'])
25+
location: {
26+
href: window.location.href,
27+
pathname: window.location.pathname,
28+
hostname: window.location.hostname,
29+
originPathname: window.location.origin + window.location.pathname
30+
}
2631
}
2732
} satisfies SystemVariables
2833

packages/commons/src/events/TemplateConfig.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export type SystemVariables = {
2929
href: string
3030
pathname: string
3131
hostname: string
32+
originPathname: string
3233
}
3334
}
3435
}
@@ -38,7 +39,7 @@ export type SystemVariables = {
3839
*/
3940
export const window = () => ({
4041
location: {
41-
get: (key: 'href' | 'pathname' | 'hostname') => {
42+
get: (key: 'href' | 'pathname' | 'hostname' | 'originPathname') => {
4243
return `$window.location.${key}`
4344
}
4445
}

0 commit comments

Comments
 (0)