[Interest] Qt Network Authorization example redirect URI
Tom Isaacson
Tom.Isaacson at navico.com
Sun Jun 3 05:37:49 CEST 2018
I'm still trying to get this to work. I've added some debugging to try and figure out what's happening:
RedditWrapper::grant()+
setModifyParametersFunction(): stage = RequestingAuthorization
RedditWrapper::grant()-
statusChanged(): status = TemporaryCredentialsReceived
setModifyParametersFunction(): stage = RequestingAccessToken
qt.networkauth.oauth2: Unexpected call
Has anyone got this to work? I'm wondering if Reddit have changed something since this example was published.
Tom Isaacson
-----Original Message-----
From: Interest <interest-bounces+tom.isaacson=navico.com at qt-project.org> On Behalf Of Tom Isaacson via Interest
Sent: Sunday, 27 May 2018 20:23
To: Michael Corcoran <michael.corcoran at outlook.com>; Interest at qt-project.org
Subject: Re: [Interest] Qt Network Authorization example redirect URI
Ah, that was it! But the app still isn't displaying any data and I get the error:
qt.networkauth.oauth2: Unexpected call
Tom Isaacson
From: Michael Corcoran <michael.corcoran at outlook.com>
Sent: Sunday, 27 May 2018 15:11
To: Tom Isaacson via Interest <Interest at qt-project.org>; Tom Isaacson <Tom.Isaacson at navico.com>
Subject: Re: Qt Network Authorization example redirect URI
I believe you need OpenSSL 1.0.x. 1.1 API is not compatible with 1.0 at all [1].
Mike
[1] https://www.mail-archive.com/tech@openbsd.org/msg36437.html
https://www.mail-archive.com/tech@openbsd.org/msg36437.html
As many of you will already be aware, the OpenSSL 1.1.0 release intentionally introduced significant API changes from the previous release[0][1]. In summary, a large number of data structures that were previously publically visible have been made opaque, with accessor functions being added in order ...
http://www.mail-archive.com
________________________________________
From: Interest <mailto:interest-bounces+michael.corcoran=outlook.com at qt-project.org> on behalf of Tom Isaacson via Interest <mailto:interest at qt-project.org>
Sent: Sunday, 27 May 2018 2:03 p.m.
To: mailto:Interest at qt-project.org
Subject: Re: [Interest] Qt Network Authorization example redirect URI
Finally realised it's http://localhost:1337/ so Reddit is accepting the request now, but the app is printing SSL errors:
qt.networkauth.oauth2: Unexpected call
qt.network.ssl: QSslSocket: cannot call unresolved function SSLv23_client_method
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_CTX_new
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_library_init
qt.network.ssl: QSslSocket: cannot call unresolved function ERR_get_error
qt.network.ssl: QSslSocket: cannot call unresolved function ERR_get_error
qt.networkauth.replyhandler: Error creating SSL context ()
I'm using Qt 5.10.1 MSVC2017 64bit so I downloaded Win64 OpenSSL v1.1.0h from:
https://slproweb.com/products/Win32OpenSSL.html
and added C:\OpenSSL-Win64\bin to PATH but it's still not working. Is there a particular version of OpenSSL I need or does Qt Creator need to be told where it is?
Tom Isaacson
-----Original Message-----
From: Interest <mailto:interest-bounces+tom.isaacson=navico.com at qt-project.org> On Behalf Of Tom Isaacson via Interest
Sent: Sunday, 27 May 2018 12:21
To: mailto:Interest at qt-project.org
Subject: [Interest] Qt Network Authorization example redirect URI
I've installed Qt 5.10.1 and I'm trying to get the Reddit example for Qt Network Authorization to work:
https://doc.qt.io/archives/qt-5.10/qtnetworkauth-redditclient-example.html
The instructions tell you to go to https://www.reddit.com/prefs/apps and get a consumer key. I created an app called QtNetworkAuthProject and set the redirect URI to http://localhost:8080/cb as suggested here:
http://blog.qt.io/blog/2017/01/25/connecting-qt-application-google-services-using-oauth-2-0/
But when I run the app Reddit says "invalid redirect_uri parameter". Apparently this can also be because the redirect URI is wrong:
https://stackoverflow.com/questions/18472733/invalid-redirect-uri-parameter-for-reddit-api
This answer suggests the blog post is out of date and it should be http://localhost:8080/ but that fails as well:
https://stackoverflow.com/a/48498861/264822
Does anyone know what the correct setting is? Also, someone should really update the example to explain this better!
Thanks.
Tom Isaacson
_______________________________________________
Interest mailing list
mailto:Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
mailto:Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
More information about the Interest
mailing list