浏览代码

fix(core): Use sessionDuration when creating anonymous sessions

Relates to #1425
Michael Bromley 3 年之前
父节点
当前提交
2960a09c28
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      packages/core/src/service/services/session.service.ts

+ 1 - 2
packages/core/src/service/services/session.service.ts

@@ -107,10 +107,9 @@ export class SessionService implements EntitySubscriberInterface {
      */
     async createAnonymousSession(): Promise<CachedSession> {
         const token = await this.generateSessionToken();
-        const anonymousSessionDurationInMs = ms('1y');
         const session = new AnonymousSession({
             token,
-            expires: this.getExpiryDate(anonymousSessionDurationInMs),
+            expires: this.getExpiryDate(this.sessionDurationInMs),
             invalidated: false,
         });
         // save the new session