diff --git a/apps/playnite-web/src/server/graphql/modules/auth/resolvers/Mutation/signIn.ts b/apps/playnite-web/src/server/graphql/modules/auth/resolvers/Mutation/signIn.ts index da5bb040..cb5e34db 100755 --- a/apps/playnite-web/src/server/graphql/modules/auth/resolvers/Mutation/signIn.ts +++ b/apps/playnite-web/src/server/graphql/modules/auth/resolvers/Mutation/signIn.ts @@ -15,14 +15,14 @@ export const signIn: NonNullable = async ( new UsernamePasswordCredential(_arg.input.username, _arg.input.password), ) + const expires = new Date() + expires.setFullYear(expires.getFullYear() + 1) _ctx.request.cookieStore?.set({ name: 'authorization', sameSite: 'strict', secure: true, domain: _ctx.domain, - expires: _arg.input.rememberMe - ? null - : new Date(Date.now() + 1000 * 60 * 60 * 24 * 14), + expires: _arg.input.rememberMe ? null : expires, value: `Bearer ${claim.credential}`, httpOnly: true, })