gilloudev / qt-google-calendar

Automatically exported from code.google.com/p/qt-google-calendar
0 stars 0 forks source link

Can't get the token for app. #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Fowowed: 
http://code.google.com/p/qt-google-calendar/wiki/HowToRegisterYourApplicationInG
oogle and created "Client ID for installed applications " 
2. Typed login/pass to my account and clicked "Login"

What is the expected output? What do you see instead?
I should be redirected to second step, where I allow the app to use data from 
my account. But when I push "Login" I only see 
"loadStarted 
loadFinished with false" in log of the app. I thik that te problem is because 
for console app the redirect url is http://localhost and on my OS there is no 
webserver running on port 80, so the view can't really redirect to localhost 
and that in my opinion causes loadFinished with false.

What version of the product are you using? On what operating system?
Xubuntu 12.04 32bit. Qt 4.8.1

Original issue reported on code.google.com by bzyx90 on 26 Jun 2012 at 8:11

GoogleCodeExporter commented 9 years ago
same problem here... Don't know how to solve it.. I'm using Ubuntu 12.04 and 
qt4.8.0

Original comment by francisc...@gmail.com on 1 Aug 2012 at 8:34

GoogleCodeExporter commented 9 years ago
Hi guys,

Sorry for late response. 
The login for Google account is made by HTTPS, and probably you know that Qt 
does have problems with HTTPS. 

I heard about those problems mostly on Windows, and it can be solved by adding 
SSL libraries. For Qt 4.8.0 it seems they created not very good distro, so some 
SSL DLLs are missed.

It works OK with Qt 4.7.4 on Linux. Now I tried to test it on 4.8.1 on Ubuntu 
12.04 - it works perfectly well.

So my suggestion is to try to upgrade to Qt 4.8.1 and get it with Qt SDK. The 
application tries to load https page and fails, then nothing more...

    m_strEndPoint = "https://accounts.google.com/o/oauth2/auth";

Hope it helps.

Original comment by igri...@ics.com on 7 Aug 2012 at 7:43

GoogleCodeExporter commented 9 years ago
The solution is:
1) Install SSL libraries on linux, to resolve the problem with them.
You should not get
"
QSslSocket: cannot resolve SSLv2_client_method
QSslSocket: cannot resolve SSLv2_server_method
" 
in your console output.
In my Ubuntu 12.04 I have currently installed "libssl-dev, libssl0.9.8, 
libssl1.0.0" so one of them eliminates the error message.
2) In Google API registration generate an API key "Client ID for web 
applications"
and as redirect url set eg. http://www.ics.com/oauth2callback it works as an 
example working url. It just need to be a valid existing web page where Google 
can redirect.  
3) Update m_strClientID in oauth2.cpp with the value generated and 
m_strRedirectURI with your url which you provided at generation step.

It should work nice and smooth.

Thanks Igor for help and I think that the issue can be marked as resolved.

Original comment by bzyx90 on 18 Aug 2012 at 7:46