@logto/next 4.0.3 → 4.1.0
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.
|
@@ -64,13 +64,15 @@ class LogtoClient extends LogtoNextBaseClient {
|
|
|
64
64
|
encryptionKey: this.config.cookieSecret,
|
|
65
65
|
cookieKey: `logto_${this.config.appId}`,
|
|
66
66
|
isSecure: this.config.cookieSecure,
|
|
67
|
-
getCookie: (...args) => {
|
|
68
|
-
|
|
67
|
+
getCookie: async (...args) => {
|
|
68
|
+
const cookieStore = await cookies();
|
|
69
|
+
return cookieStore.get(...args)?.value ?? '';
|
|
69
70
|
},
|
|
70
|
-
setCookie: (...args) => {
|
|
71
|
+
setCookie: async (...args) => {
|
|
71
72
|
// In server component (RSC), it is not allowed to modify cookies, see https://nextjs.org/docs/app/api-reference/functions/cookies#cookiessetname-value-options.
|
|
72
73
|
if (!ignoreCookieChange) {
|
|
73
|
-
cookies()
|
|
74
|
+
const cookieStore = await cookies();
|
|
75
|
+
cookieStore.set(...args);
|
|
74
76
|
}
|
|
75
77
|
},
|
|
76
78
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/next",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "./lib/src/index.js",
|
|
6
6
|
"types": "./lib/src/index.d.ts",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@edge-runtime/cookies": "^5.0.0",
|
|
45
45
|
"cookie": "^1.0.0",
|
|
46
|
-
"@logto/node": "^3.0
|
|
46
|
+
"@logto/node": "^3.1.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@silverhand/eslint-config": "^6.0.1",
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"@vitest/coverage-v8": "^1.6.0",
|
|
54
54
|
"eslint": "^8.57.0",
|
|
55
55
|
"lint-staged": "^15.0.0",
|
|
56
|
-
"next": "^
|
|
57
|
-
"next-test-api-route-handler": "^4.0.
|
|
56
|
+
"next": "^15.0.4",
|
|
57
|
+
"next-test-api-route-handler": "^4.0.14",
|
|
58
58
|
"prettier": "^3.0.0",
|
|
59
|
-
"react": "
|
|
60
|
-
"react-dom": "
|
|
59
|
+
"react": "19.0.0",
|
|
60
|
+
"react-dom": "19.0.0",
|
|
61
61
|
"typescript": "^5.3.3",
|
|
62
62
|
"vitest": "^1.6.0"
|
|
63
63
|
},
|