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

Allow user to set redirect_uri when using QOAuth2AuthorizationCodeFlow

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Closed
    • Priority: P4: Low
    • Resolution: Done
    • Affects Version/s: 5.8.0
    • Fix Version/s: 5.9.0 Beta 2
    • Labels:
      None
    • Environment:

      Linux - fedora 25; x86_64; g++

    • Commits:
      034b35a3bcbc34509f77b46d3754196c9d53552d

      Description

      For OAuth 2.0 using QT's networkauth and the new QOAuth2AuthorizationCodeFlow object, I cant set the redirect_uri. When working with google this results in the following authenticate url being sent:

      https://accounts.google.com/o/oauth2/auth?client_id=123-abc.apps.googleusercontent.com&redirect_uri=http://localhost:65535/cb&response_type=code&scope=email&state=iEIYn5sN

      The setting of redirect_uri to "http://localhost", results in an Error 400 redirect_uri_mismatch from google which is obviously expecting the actual redirect hostname to be provided.

      In Qt/5.8/Src/qtnetworkauth/src/oauth/qoauthhttpserverreplyhandler.cpp, the callback address looks hard-coded. The callback() routine in turn used in Qt/5.8/Src/qtnetworkauth/src/oauth/qoauth2authorizationcodeflow.cpp to set the redirectUri value to http://localhost.

      Please allow some way for the redirect uri parameter to be set.

        Attachments

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

          Activity

            People

            • Assignee:
              manordheim MÃ¥rten Nordheim
              Reporter:
              myk Michael Arnold
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes