Skip to content
This repository has been archived by the owner on Mar 11, 2022. It is now read-only.

Auto-renewed session cookies do not persist beyond original session lifetime #463

Closed
ricellis opened this issue Sep 14, 2021 · 0 comments · Fixed by #464
Closed

Auto-renewed session cookies do not persist beyond original session lifetime #463

ricellis opened this issue Sep 14, 2021 · 0 comments · Fixed by #464
Assignees
Milestone

Comments

@ricellis
Copy link
Member

Bug Description

Auto-renewed session cookies do not persist beyond original session lifetime.

It turns out request uses tough-cookie and this problem is caused by salesforce/tough-cookie#154 and is very similar to IBM/cloudant-node-sdk#209. The reason it was not obvious before in this library was that a 401 response causes a fallback renewal so it was typically masked by that fallback renewal attempt.

1. Steps to reproduce and the simplest code sample possible to demonstrate the issue

  1. Make a request that starts a session
  2. Wait until an auto-renew happens at 50% of the session lifetime, getting a second session
  3. Make a second request as the first session lifetime finishes

2. What you expected to happen

The second request should have the cookie for the second session.

3. What actually happened

The second request has no cookie (as is purged at the first session expiry time).

Environment details

  • Version(s) that are affected by this issue.

    4.2.2 to 4.5.0

  • Node.js version

    14.17.3

@ricellis ricellis self-assigned this Sep 14, 2021
@ricellis ricellis added this to the 4.next milestone Sep 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant