@@ -114,7 +114,7 @@ export function defaultCookies(useSecureCookies: boolean): CookiesOptions {
114
114
path : "/" ,
115
115
secure : useSecureCookies ,
116
116
} ,
117
- }
117
+ } ,
118
118
}
119
119
}
120
120
@@ -161,22 +161,22 @@ export class SessionStore {
161
161
}
162
162
}
163
163
164
- /**
164
+ /**
165
165
* The JWT Session or database Session ID
166
166
* constructed from the cookie chunks.
167
167
*/
168
- get value ( ) {
169
- // Sort the chunks by their keys before joining
170
- const sortedKeys = Object . keys ( this . #chunks) . sort ( ( a , b ) => {
171
- const aSuffix = parseInt ( a . split ( "." ) . pop ( ) || "0" )
172
- const bSuffix = parseInt ( b . split ( "." ) . pop ( ) || "0" )
168
+ get value ( ) {
169
+ // Sort the chunks by their keys before joining
170
+ const sortedKeys = Object . keys ( this . #chunks) . sort ( ( a , b ) => {
171
+ const aSuffix = parseInt ( a . split ( "." ) . pop ( ) ?? "0" )
172
+ const bSuffix = parseInt ( b . split ( "." ) . pop ( ) ?? "0" )
173
173
174
- return aSuffix - bSuffix
175
- } ) ;
174
+ return aSuffix - bSuffix
175
+ } )
176
176
177
- // Use the sorted keys to join the chunks in the correct order
178
- return sortedKeys . map ( key => this . #chunks[ key ] ) . join ( "" )
179
- }
177
+ // Use the sorted keys to join the chunks in the correct order
178
+ return sortedKeys . map ( ( key ) => this . #chunks[ key ] ) . join ( "" )
179
+ }
180
180
181
181
/** Given a cookie, return a list of cookies, chunked to fit the allowed cookie size. */
182
182
#chunk( cookie : Cookie ) : Cookie [ ] {
1 commit comments
vercel[bot] commentedon Oct 2, 2023
Successfully deployed to the following URLs:
next-auth-docs – ./docs
next-auth-docs-dun.vercel.app
v4.authjs.dev
next-auth-docs-git-v4-authjs.vercel.app
next-auth-docs-authjs.vercel.app
www.next-auth.js.org
next-auth.js.org