Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-104621

Provide autorefresh of OAuth tokens

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • None

    Description

      Currently, QtNetworkAuth requires you to manually check if the access token has expired and needs refreshed. I propose that NetworkAuth should automatically perform refreshing of OAuth access tokens:

      1. When the access token is retrieved, NetworkAuth checks to see if a refresh token was provided. If so, it stores it for later use; otherwise, it assumes that refreshing the token is not needed.
      2. NetworkAuth attempts to extract an access token lifetime from the access token response body. If it can be retrieved, NetworkAuth starts a single-shot QTimer that will fire about 10 seconds before the access token expires. The timer's payload simply calls refreshAccessToken() on the OAuth object.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jefernan Jesus Fernandez
            lorendb Loren Burkholder
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes