@zitadel/sdk-next 1.0.0-alpha.22 → 1.0.0-alpha.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../src/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAQ/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAmC3C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,WAAW,EAChB,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,YAAY,GAAG,QAAQ,CAAC,CAqDlC;AAqPD;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,wBAAwB,EAAE,WAAW,GAAG,KAAK,CAAC,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,YAAY,GAAG,QAAQ,CAAC,CAAC;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,GAAE,YAAiB,GAAG,YAAY,CAO5F"}
1
+ {"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../src/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAQ/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAmC3C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,WAAW,EAChB,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,YAAY,GAAG,QAAQ,CAAC,CAqDlC;AAuPD;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,wBAAwB,EAAE,WAAW,GAAG,KAAK,CAAC,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,YAAY,GAAG,QAAQ,CAAC,CAAC;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,GAAE,YAAiB,GAAG,YAAY,CAO5F"}
@@ -174,7 +174,9 @@ async function proxyRequest(req, authUrl, proxyPath, proxyTimeoutMs) {
174
174
  redirect: "manual",
175
175
  signal: AbortSignal.timeout(proxyTimeoutMs),
176
176
  });
177
- const responseHeaders = filterResponseHeaders(upstream.headers);
177
+ // The app's own request URL: the origin a proxied redirect may name, and
178
+ // the base a relative one resolves against.
179
+ const responseHeaders = filterResponseHeaders(upstream.headers, req.nextUrl.toString());
178
180
  const setCookies = upstream.headers.getSetCookie?.() ?? [];
179
181
  for (const cookie of setCookies) {
180
182
  responseHeaders.append("set-cookie", cookie);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zitadel/sdk-next",
3
- "version": "1.0.0-alpha.22",
3
+ "version": "1.0.0-alpha.24",
4
4
  "description": "Next.js helpers and mock auth UI for Zitadel",
5
5
  "homepage": "https://github.com/zitadel/nextgen/tree/main/packages/sdk-next#readme",
6
6
  "bugs": {
@@ -55,9 +55,9 @@
55
55
  },
56
56
  "dependencies": {
57
57
  "server-only": "^0.0.1",
58
- "@zitadel/components": "1.0.0-alpha.22",
59
- "@zitadel/sdk-core": "1.0.0-alpha.22",
60
- "@zitadel/api": "1.0.0-alpha.22"
58
+ "@zitadel/api": "1.0.0-alpha.24",
59
+ "@zitadel/sdk-core": "1.0.0-alpha.24",
60
+ "@zitadel/components": "1.0.0-alpha.24"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "next": ">=15",
@@ -71,6 +71,7 @@
71
71
  "@testing-library/react": "^16.3.2",
72
72
  "@testing-library/user-event": "^14.6.1",
73
73
  "@types/react": "^19.2.14",
74
+ "@vitest/coverage-v8": "^3.2.7",
74
75
  "eslint": "^9.0.0",
75
76
  "eslint-config-prettier": "^10.0.0",
76
77
  "eslint-import-resolver-typescript": "^3.7.0",
@@ -86,12 +87,13 @@
86
87
  "prettier": "^3.0.0",
87
88
  "typescript": "^5.7.3",
88
89
  "typescript-eslint": "^8.0.0",
89
- "vitest": "^3.0.0"
90
+ "vitest": "^3.2.7"
90
91
  },
91
92
  "scripts": {
92
93
  "build": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.build.json && node -e \"require('node:fs').copyFileSync('src/jsx.d.ts', 'dist/jsx.d.ts')\"",
93
94
  "typecheck": "tsc --build tsconfig.json",
94
- "test": "vitest run --passWithNoTests",
95
+ "test": "vitest run",
96
+ "test:all": "pnpm run test",
95
97
  "lint": "eslint ."
96
98
  }
97
99
  }