@zitadel/sdk-next 1.0.0-alpha.23 → 1.0.0-alpha.25
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.
- package/README.md +1 -1
- package/dist/middleware.d.ts.map +1 -1
- package/dist/middleware.js +3 -1
- package/package.json +13 -24
package/README.md
CHANGED
|
@@ -237,7 +237,7 @@ There is no `api-base` attribute — the element reads the global handle from
|
|
|
237
237
|
| Option | Type | Default | Description |
|
|
238
238
|
| ------------------- | -------------------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
|
|
239
239
|
| `url` | `string` | `ZITADEL_URL` env | Full URL of the Zitadel auth backend |
|
|
240
|
-
| `proxyPath` | `string` | `"/__nextgen"` | Path prefix proxied to the auth backend
|
|
240
|
+
| `proxyPath` | `string` | `"/__nextgen"` | Path prefix proxied to the auth backend. Sign-in with an external provider currently requires the default: the provider returns to `/__nextgen/idp/callback` |
|
|
241
241
|
| `protectedRoutes` | `string[]` | `[]` | Paths requiring a valid session. Trailing `*` matches sub-paths |
|
|
242
242
|
| `ignoredRoutes` | `string[]` | `[]` | Paths skipped entirely — no JWT check, no tunnelling. Useful for webhooks or health checks. Trailing `*` matches sub-paths |
|
|
243
243
|
| `loginPath` | `string` | `"/login"` | Where to redirect unauthenticated users |
|
package/dist/middleware.d.ts.map
CHANGED
|
@@ -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;
|
|
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"}
|
package/dist/middleware.js
CHANGED
|
@@ -174,7 +174,9 @@ async function proxyRequest(req, authUrl, proxyPath, proxyTimeoutMs) {
|
|
|
174
174
|
redirect: "manual",
|
|
175
175
|
signal: AbortSignal.timeout(proxyTimeoutMs),
|
|
176
176
|
});
|
|
177
|
-
|
|
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.
|
|
3
|
+
"version": "1.0.0-alpha.25",
|
|
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/
|
|
59
|
-
"@zitadel/
|
|
60
|
-
"@zitadel/
|
|
58
|
+
"@zitadel/api": "1.0.0-alpha.25",
|
|
59
|
+
"@zitadel/components": "1.0.0-alpha.25",
|
|
60
|
+
"@zitadel/sdk-core": "1.0.0-alpha.25"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"next": ">=15",
|
|
@@ -65,33 +65,22 @@
|
|
|
65
65
|
"react-dom": ">=18"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@eslint/js": "^9.0.0",
|
|
69
|
-
"@eslint/json": "^0.11.0",
|
|
70
|
-
"@eslint/markdown": "^6.0.0",
|
|
71
68
|
"@testing-library/react": "^16.3.2",
|
|
72
69
|
"@testing-library/user-event": "^14.6.1",
|
|
70
|
+
"@types/node": "^25.6.0",
|
|
73
71
|
"@types/react": "^19.2.14",
|
|
74
|
-
"
|
|
75
|
-
"eslint-config-prettier": "^10.0.0",
|
|
76
|
-
"eslint-import-resolver-typescript": "^3.7.0",
|
|
77
|
-
"eslint-plugin-import": "^2.31.0",
|
|
78
|
-
"eslint-plugin-jsx-a11y": "^6.10.0",
|
|
79
|
-
"eslint-plugin-perfectionist": "^4.0.0",
|
|
80
|
-
"eslint-plugin-prettier": "^5.0.0",
|
|
81
|
-
"eslint-plugin-react": "^7.37.0",
|
|
82
|
-
"eslint-plugin-react-hooks": "^5.0.0",
|
|
83
|
-
"eslint-plugin-testing-library": "^7.0.0",
|
|
72
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
84
73
|
"jsdom": "^29.0.2",
|
|
85
74
|
"next": "^16.2.11",
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"typescript
|
|
89
|
-
"vitest": "^
|
|
75
|
+
"react": "^19.2.8",
|
|
76
|
+
"react-dom": "^19.2.8",
|
|
77
|
+
"typescript": "^6.0.3",
|
|
78
|
+
"vitest": "^4.1.11"
|
|
90
79
|
},
|
|
91
80
|
"scripts": {
|
|
92
81
|
"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
|
-
"typecheck": "tsc --
|
|
94
|
-
"test": "vitest run
|
|
95
|
-
"
|
|
82
|
+
"typecheck": "tsc --noEmit -p tsconfig.lib.json && tsc --noEmit -p tsconfig.spec.json",
|
|
83
|
+
"test": "vitest run",
|
|
84
|
+
"test:all": "pnpm run test"
|
|
96
85
|
}
|
|
97
86
|
}
|