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

Allow user to set redirect_uri when using QOAuth2AuthorizationCodeFlow

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P4: Low
    • 5.9.0 Beta 2
    • 5.8.0
    • None
    • Linux - fedora 25; x86_64; g++

    • 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

        1. screenshot-1.png
          21 kB
          Jesus Fernandez
        For Gerrit Dashboard: QTBUG-59653
        # Subject Branch Project Status CR V

        Activity

          People

            manordheim MÃ¥rten Nordheim
            myk Michael Arnold
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes