Details
-
Bug
-
Resolution: Invalid
-
P1: Critical
-
None
-
5.12.0
-
None
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.