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

QOAuth2 Mismatching redirect URI

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P1: Critical
    • None
    • 5.12.0
    • None
    • Windows

    Description

      QT 5.12.3 introduced a regression regarding OAouth2 authorization. While this code was working perfectly fine prior to 5.12, it is a real show stopper now.

       

      void OnLogin()
      {
       connect(m_QtOAuth2, &QOAuth2AuthorizationCodeFlow::tokenChanged, [this](const QString &in_token)
       {
       m_AccessToken = in_token;
       });
       m_QtOAuth2->setContentType(QAbstractOAuth2::ContentType::WwwFormUrlEncoded);
       m_QtOAuth2->setClientIdentifier(CLIENT_ID);
       m_QtOAuth2->setClientIdentifierSharedKey(CLIENT_SECRET);
       m_QtOAuth2->setAuthorizationUrl(QUrl("https://mysite.com/oauth2/authorize/?response_type=code"));
       m_QtOAuth2->setAccessTokenUrl(QUrl("https://mysite.com/oauth2/token/"));
       m_QtOAuth2->setScope("read write");
      auto l_reply = new QOAuthHttpServerReplyHandler(QHostAddress("http://127.0.0.1"), 8080, this);
       m_QtOAuth2->setReplyHandler(l_reply);
       m_QtOAuth2->grant();
      }
      

      It would be rather difficult to make a test case to reproduce this behavior on my own as the credentials are privates but I'll assist in any way I can to tame this bug.

       

      Attachments

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

        Activity

          People

            jefernan Jesus Fernandez
            neosettler neosettler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes