Bläddra i källkod

fix(core): Use sessionDuration when creating anonymous sessions

Relates to #1425
Michael Bromley 4 år sedan
förälder
incheckning
2960a09c28
1 ändrade filer med 1 tillägg och 2 borttagningar
  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> {
     async createAnonymousSession(): Promise<CachedSession> {
         const token = await this.generateSessionToken();
         const token = await this.generateSessionToken();
-        const anonymousSessionDurationInMs = ms('1y');
         const session = new AnonymousSession({
         const session = new AnonymousSession({
             token,
             token,
-            expires: this.getExpiryDate(anonymousSessionDurationInMs),
+            expires: this.getExpiryDate(this.sessionDurationInMs),
             invalidated: false,
             invalidated: false,
         });
         });
         // save the new session
         // save the new session