QOAuth2AuthorizationCodeFlow accessing Spotify
-
I am trying to make this project to work.
I changed
mainwindow.cpp:22
to use myClient Id
, andmainwindow.cpp:23
to use myClient Secret
, that I registered for my app at Spotify.But it does not matter which Redirect URI I set for my app registration, at Spotify, this example uses
redirect_uri=http://localhost/:8080
in the URL. I tried to edit it toredirect_uri=https://localhost/:8080
, as I (think I) read somewhere, but with no results: the browser reportsINVALID_CLIENT: Invalid redirect URI
.I also tried to insert
replyHandler->setProperty("redirect_uri", "https://localhost:8080/");
after line 19.I also read this, this and this, but I just couldn't get it to work.
Later, I had the idea to clear the "data of the hosted app" in the browser's cache (I dont know if that's the English name, as my browser runs in pt-br) , and the login page at last appeared!!
I have to click 3 times on the
Login
button for the Gotcha to appear (click on the images with cars, etc), but nothing happens in the browser or in the app. I even created a premium account at Spotify, but it made no difference.Any help will be much appreciated!!
Thanks!
-
@canellas
Are you sure you want to redirect tohttps://localhost:8080
?? Note the https!
If not then change it tohttp://localhost:8080
If it's correct check that you have OpenSSL binaries available for your app.I have no idea if QOAuthHttpServerReplyHandler is capable of SSL, but this was what came to my mind first.