[Interest] Qt Network Authorization example redirect URI

Michael Corcoran michael.corcoran at outlook.com
Sun May 27 05:10:30 CEST 2018


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
OpenSSL 1.1 API migration path (or the lack thereof...)<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 ...
www.mail-archive.com


________________________________
From: Interest <interest-bounces+michael.corcoran=outlook.com at qt-project.org> on behalf of Tom Isaacson via Interest <interest at qt-project.org>
Sent: Sunday, 27 May 2018 2:03 p.m.
To: 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 <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

_______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180527/4ef123de/attachment.html>


More information about the Interest mailing list