diff --git a/examples/custom-session-jwt/keystone.ts b/examples/custom-session-jwt/keystone.ts index 60b9462978e..0c94fdd3269 100644 --- a/examples/custom-session-jwt/keystone.ts +++ b/examples/custom-session-jwt/keystone.ts @@ -56,8 +56,8 @@ const jwtSessionStrategy = { if (!context.req) return; const { cookie = '' } = context.req.headers; - const [user, jwt] = cookie.split('='); - if (user !== 'user') return; + const [cookieName, jwt] = cookie.split('='); + if (cookieName !== 'user') return; const jwtResult = await jwtVerify(jwt); if (!jwtResult) return; diff --git a/examples/custom-session/keystone.ts b/examples/custom-session/keystone.ts index c570bbeff7b..832e1ba5fe7 100644 --- a/examples/custom-session/keystone.ts +++ b/examples/custom-session/keystone.ts @@ -13,8 +13,8 @@ const sillySessionStrategy = { // // in practice, you should use authentication for your sessions, such as OAuth or JWT const { cookie = '' } = context.req.headers; - const [user, id] = cookie.split('='); - if (user !== 'user') return; + const [cookieName, id] = cookie.split('='); + if (cookieName !== 'user') return; const who = await context.sudo().db.User.findOne({ where: { id } }); if (!who) return; diff --git a/examples/usecase-blog-moderated/keystone.ts b/examples/usecase-blog-moderated/keystone.ts index 9e67ff37153..bc878158111 100644 --- a/examples/usecase-blog-moderated/keystone.ts +++ b/examples/usecase-blog-moderated/keystone.ts @@ -14,8 +14,8 @@ const sillySessionStrategy = { // // in practice, you should use authentication for your sessions, such as OAuth or JWT const { cookie = '' } = context.req.headers; - const [user, id] = cookie.split('='); - if (user !== 'user') return; + const [cookieName, id] = cookie.split('='); + if (cookieName !== 'user') return; const who = await context.sudo().db.User.findOne({ where: { id } }); if (!who) return; @@ -31,12 +31,8 @@ const sillySessionStrategy = { // context.sessionStrategy.start // context.sessionStrategy.end // - async start(): Promise { - return; - }, - async end(): Promise { - return; - }, + async start() {}, + async end() {}, }; export default config({