Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1401

Automatically refresh tokens as they near expiration date

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: OIDC DB Auth
    • None
    • 3
    • Not Needed
    • Iteration Whale, Iteration Xantic Sargo

      When storing tokens in the plugin’s storeTokenSet method, set an unref’ed setTimeout() to perform tryRefresh() 5 minutes before the access token expires (and handle the case in which the expiration time is less than 5 minutes here somehow as well). Ensure that only one tryRefresh() is active at a given time and that calling tryRefresh() early cancels the timer.

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: