Skip to content

Commit

Permalink
fix(core): Use sessionDuration when creating anonymous sessions
Browse files Browse the repository at this point in the history
Relates to #1425
  • Loading branch information
michaelbromley committed Feb 24, 2022
1 parent 4a81f7c commit 2960a09
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/core/src/service/services/session.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2960a09

Please sign in to comment.