Skip to content

Commit

Permalink
fix(chore): remove colon in cookie key
Browse files Browse the repository at this point in the history
  • Loading branch information
wangsijie committed Oct 10, 2024
1 parent 696c0d5 commit d2883d1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/next/edge/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default class LogtoClient extends BaseClient {

this.storage = new CookieStorage({
encryptionKey: this.config.cookieSecret,
cookieKey: `logto:${this.config.appId}`,
cookieKey: `logto_${this.config.appId}`,
isSecure: this.config.cookieSecure,
getCookie: (name) => {
return cookies.get(name)?.value ?? '';
Expand Down
2 changes: 1 addition & 1 deletion packages/next/server-actions/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default class LogtoClient extends BaseClient {
const { cookies } = await import('next/headers');
this.storage = new CookieStorage({
encryptionKey: this.config.cookieSecret,
cookieKey: `logto:${this.config.appId}`,
cookieKey: `_${this.config.appId}`,
isSecure: this.config.cookieSecure,
getCookie: (...args) => {
return cookies().get(...args)?.value ?? '';
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export default class LogtoClient extends LogtoNextBaseClient {
): Promise<NodeClient> {
this.storage = new CookieStorage({
encryptionKey: this.config.cookieSecret,
cookieKey: `logto:${this.config.appId}`,
cookieKey: `logto_${this.config.appId}`,
isSecure: this.config.cookieSecure,
getCookie: (name) => {
return request.cookies[name] ?? '';
Expand Down

0 comments on commit d2883d1

Please sign in to comment.