[Interest] Qt Network Authorization example redirect URI

Tom Isaacson Tom.Isaacson at navico.com
Sun May 27 04:03:08 CEST 2018


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 <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: 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
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest




More information about the Interest mailing list