@pylonsync/next 0.3.295 → 0.3.297
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/package.json +3 -3
- package/src/proxy.ts +0 -8
- package/src/server.ts +1 -2
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.3.
|
|
6
|
+
"version": "0.3.297",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"description": "Next.js helpers for Pylon — cookie-based auth gate, server-side session helpers, and reusable client hooks.",
|
|
9
9
|
"exports": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"check": "tsc -p tsconfig.json --noEmit"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@pylonsync/sdk": "0.3.
|
|
22
|
-
"@pylonsync/react": "0.3.
|
|
21
|
+
"@pylonsync/sdk": "0.3.297",
|
|
22
|
+
"@pylonsync/react": "0.3.297"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"next": ">=16.0.0",
|
package/src/proxy.ts
CHANGED
|
@@ -29,12 +29,6 @@ export type CreatePylonProxyOptions = {
|
|
|
29
29
|
* request whose path doesn't match this option — so a consumer
|
|
30
30
|
* stacking proxies doesn't accidentally trigger Pylon's
|
|
31
31
|
* redirect-to-login on routes Pylon was never supposed to gate.
|
|
32
|
-
*
|
|
33
|
-
* Before 0.3.96 this option was only used to populate the returned
|
|
34
|
-
* `config.matcher`; the runtime function ignored it. Consumers with
|
|
35
|
-
* broader outer matchers hit ERR_TOO_MANY_REDIRECTS when an
|
|
36
|
-
* unauthenticated user landed on /login (Pylon redirected /login →
|
|
37
|
-
* /login?next=/login → /login → …).
|
|
38
32
|
*/
|
|
39
33
|
matcher?: string[];
|
|
40
34
|
};
|
|
@@ -81,8 +75,6 @@ export function createPylonProxy(opts: CreatePylonProxyOptions = {}) {
|
|
|
81
75
|
// hits /login" themselves) gets redirected to
|
|
82
76
|
// `/login?next=/login`, the browser follows, same proxy runs,
|
|
83
77
|
// infinite redirect → ERR_TOO_MANY_REDIRECTS in the browser.
|
|
84
|
-
// Surfaced 2026-05-15 by a pylon-cloud-style consumer with a
|
|
85
|
-
// composed proxy.
|
|
86
78
|
if (pathname === loginUrl) return NextResponse.next();
|
|
87
79
|
|
|
88
80
|
// Runtime matcher gate. The `matcher` option is now load-bearing
|
package/src/server.ts
CHANGED
|
@@ -268,8 +268,7 @@ export function createPylonServer(config: PylonServerConfig): PylonServer {
|
|
|
268
268
|
// Single round-trip to /api/auth/session — pylon returns
|
|
269
269
|
// `{ session, user }` where `user` is the User row projected
|
|
270
270
|
// to safe fields (passwordHash + framework-internal columns
|
|
271
|
-
// stripped).
|
|
272
|
-
// /api/auth/me + /api/fn/getMe dance.
|
|
271
|
+
// stripped).
|
|
273
272
|
//
|
|
274
273
|
// Network failures throw PylonUnreachableError (caught by the
|
|
275
274
|
// route's error.tsx). Older code swallowed them as null which
|