in src/sessions/SessionManager.ts [199:208]
private storeSessionAsCookie() {
if (this.useCookies() && this.config.userIdRetentionDays > 0) {
this.createOrRenewUserCookie(this.userId, this.userExpiry);
}
if (this.useCookies()) {
// Set the user cookie in case useCookies() has changed from false to true.
this.createOrRenewSessionCookie(this.session, this.sessionExpiry);
}
}