msjit / testcasedb

TestCaseDB - Web based test case management
MIT License
40 stars 18 forks source link

The page isn't redirecting properly #23

Closed kirantpatil closed 10 years ago

kirantpatil commented 10 years ago

It tries process the authentication and returns below error

The cookies are enabled and does accept in browser.

Firefox Version 30.0

Error on browser

The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

This problem can sometimes be caused by disabling or refusing to accept cookies.
joffems commented 10 years ago

For your google API key have you set your redirect uri and javascript origin? You can do this at https://console.developers.google.com/ in the credentials section.

Assume that you're hosting at the domain localhost, the values are:

redirect uris:
http://localhost/auth/google_oauth2/callback

javascript origin: http://localhost

kirantpatil commented 10 years ago

Yes, I have placed them as below,

Javascript origin: https://qax.greenturtles.in

Redirct URIs: https://qax.greenturtles.in/auth/google_oauth2/callback

joffems commented 10 years ago

Can you please open firebug and the network panel and track where the redirection is occurring.

kirantpatil commented 10 years ago

From the net panel, I could see message as below from firebug net panel,

Request Headers: Accept text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 Accept-Encoding gzip, deflate Accept-Language en-US,en;q=0.5 Connection keep-alive Cookie _tcdb_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRkkiJTk2ODVhNmE5ZTY0MGJjMTFkMTczYWI3ZjI2ZDFkYWU4BjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMTFuZ3F1RVBjdG5SczlQeVpZQyttKzRlUnlHOVJYSVdhdjNSS1I2ay82bk09BjsARkkiCmZsYXNoBjsARm86JUFjdGlvbkRpc3BhdGNoOjpGbGFzaDo6Rmxhc2hIYXNoCToKQHVzZWRvOghTZXQGOgpAaGFzaHsGOgplcnJvclQ6DEBjbG9zZWRGOg1AZmxhc2hlc3sGOwpJIhROb3QgYXV0aG9yaXplZC4GOwBGOglAbm93MA%3D%3D--8b89ceeb9893a45f6826ed50ae25d1d7ff203354 Host qax.greenturtles.in Referer https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=283342400864-bfsged1tjbbljuiclph3kbflc03r8uh8.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fqax.greenturtles.in%2Fauth%2Fgoogle_oauth2%2Fcallback&response_type=code&scope=email+profile&state=ddfdbd6dc92272cca3c6c2beb8684e7a7c30ad5c33e2e3a5 User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0

Response Headers: Cache-Control no-cache, private Connection keep-alive Content-Length 9 Content-Type text/html Date Mon, 07 Jul 2014 03:07:44 GMT Location /auth/failure?message=invalid_credentials&strategy=google_oauth2 Server nginx/1.4.6 (Ubuntu) Set-Cookie _tcdb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTk2ODVhNmE5ZTY0MGJjMTFkMTczYWI3ZjI2ZDFkYWU4BjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMTFuZ3F1RVBjdG5SczlQeVpZQyttKzRlUnlHOVJYSVdhdjNSS1I2ay82bk09BjsARg%3D%3D--54fd59cb308c14cab9776eb9598cb97d7d3648b2; path=/; HttpOnly X-Rack-Cache miss X-Request-Id c78c30f165fd4a735535a33de3949bc1 X-Runtime 0.001964 status 302 Found x-ua-compatible IE=Edge,chrome=1

kirantpatil commented 10 years ago

Respnse Header:

Cache-Control no-cache, private Connection keep-alive Content-Type text/html; charset=utf-8 Date Mon, 07 Jul 2014 03:07:45 GMT Location https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=283342400864-bfsged1tjbbljuiclph3kbflc03r8uh8.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fqax.greenturtles.in%2Fauth%2Fgoogle_oauth2%2Fcallback&response_type=code&scope=email+profile&state=ddfdbd6dc92272cca3c6c2beb8684e7a7c30ad5c33e2e3a5 Server nginx/1.4.6 (Ubuntu) Set-Cookie _tcdb_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRkkiJTk2ODVhNmE5ZTY0MGJjMTFkMTczYWI3ZjI2ZDFkYWU4BjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMTFuZ3F1RVBjdG5SczlQeVpZQyttKzRlUnlHOVJYSVdhdjNSS1I2ay82bk09BjsARkkiCmZsYXNoBjsARm86JUFjdGlvbkRpc3BhdGNoOjpGbGFzaDo6Rmxhc2hIYXNoCToKQHVzZWRvOghTZXQGOgpAaGFzaHsAOgxAY2xvc2VkRjoNQGZsYXNoZXN7BjoKZXJyb3JJIhROb3QgYXV0aG9yaXplZC4GOwBGOglAbm93MA%3D%3D--48b644a6306306ffc1e607a7726de813eea1c31c; path=/; HttpOnly Transfer-Encoding chunked X-Rack-Cache miss X-Request-Id 97b7cf4c553c852d02d0cbfb0bc75b08 X-Runtime 0.002959 status 302 Found x-ua-compatible IE=Edge,chrome=1

Request Header:

Accept text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 Accept-Encoding gzip, deflate Accept-Language en-US,en;q=0.5 Cache-Control max-age=0 Connection keep-alive Cookie _tcdb_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTk2ODVhNmE5ZTY0MGJjMTFkMTczYWI3ZjI2ZDFkYWU4BjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMTFuZ3F1RVBjdG5SczlQeVpZQyttKzRlUnlHOVJYSVdhdjNSS1I2ay82bk09BjsARg%3D%3D--54fd59cb308c14cab9776eb9598cb97d7d3648b2 Host qax.greenturtles.in Referer https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=283342400864-bfsged1tjbbljuiclph3kbflc03r8uh8.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fqax.greenturtles.in%2Fauth%2Fgoogle_oauth2%2Fcallback&response_type=code&scope=email+profile&state=ddfdbd6dc92272cca3c6c2beb8684e7a7c30ad5c33e2e3a5 User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0

Response Header:

Alternate-Protocol 443:quic Cache-Control no-cache, no-store, max-age=0, must-revalidate Content-Encoding gzip Content-Length 303 Content-Type text/html; charset=UTF-8 Date Mon, 07 Jul 2014 03:07:45 GMT Expires Fri, 01 Jan 1990 00:00:00 GMT Location https://qax.greenturtles.in/auth/google_oauth2/callback?state=ddfdbd6dc92272cca3c6c2beb8684e7a7c30ad5c33e2e3a5&code=4/jN24CwMvZBCmKDZuFjBja4sTkkjm.MhEKM7c4nNATdJfo-QBMszs86JgdjgI Pragma no-cache Server GSE X-Firefox-Spdy 3.1 X-Frame-Options SAMEORIGIN x-content-type-options nosniff x-xss-protection 1; mode=block

Request Header:

Accept text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 Accept-Encoding gzip, deflate Accept-Language en-US,en;q=0.5 Cache-Control max-age=0 Connection keep-alive Cookie LSOSID=DQAAAMsAAAD3-CQz6VZzFK_YcoFqxUOD3ucqS4O_UCO3vNR7RbnODMpToL1loJKOxrRis2cQJXT-c1hjnKTzgm3qCLycUKN-wAxJ917qKMYfNPomOEOZlMUNNAmpqHkzK0FTNVhcg7doLq7eIcNGl7ycLwcBysBB5nwMdqb8q0EQfwIZ7KEReGuW0viKCIm_eoJ8XBMvQGdFuITjXcKvv6ujtiQnt60CtHjVYrebE7sAP1vDeavCmiAfJz56UD0zeVodd7LkmI5Q_EUl3Ae6qRqAEgBEw7jw; GAPS=1:v8ZY68nOkObLm1G-uQkd5edYCTwg3A:evNPda4DCRHA1hwq; GALX=3c42ZKZ8CKc; NID=67=IwAfH4fP_53ktfoWjLLy8ujmsYjN5JYfoI4A5ek7wvV5ZKpzpJo1RmTWTAv5pzlq_hbvGYYiTH_F3ZHxFaXZ2S4XUz8XF_6a4X_e0f4cElsH6sY3Lk3htmJBOmRK1E5FfTD-PbNSENVtZn0BZ1VtEqDOB_gzk5LXYJ9NkCzusHLwqg; SID=DQAAAMgAAABV3C0hX93f0--Ah0-Yv74yY33_tlYxkaU9C95gzEoFbcjquOt5NdRyhoD-Bhrhk-TY4u95YFoJiV2y3MYuEDmaZNwualYiT0iTiGnCPMZh6XX2XoIKwEDSPE-vxQxmo8KSy13n1bFFHM3pjSMMbT9kgNOmAoIsPdkb7WZEik5kTrqIsq188HTUXTOpMDTCl_QoQzAeeV-Byw3sntpT1_M_FVWe8xLlCI_XWMV7QI7Hx6FHgM3uTo32qPYeZoal8WrgPHEBYGVyxS5xAOJRifZe; LSID=lso|o.security.google.com|s.IN|s.youtube:DQAAAMsAAADAxBpCbqsnsthfH-sUkd4Kl-HUkEAFtzCTAUkZBRxnCArqHHqvo54-EgUIRuIvONmML6JBV5byHlNswBCCAD_oF9XEGHiE2Ud0E_40uHgGVM02vxVN_lIYEHKDwF4OBjddFtQZPIo9b853eF0dmAC3Sn6aVioYbRx60XY2CqpSdRw105OGKPKVGbfl_L6O6bKexLjbfVQjO-a08bnFXPx-HMYEYljdpirbIOXEuTi3XBXiDGS6CzEvL-rjtLrzI7U-Iwk2Xqi50bwNAIGL5vQY; HSID=AAO8z2uU4feLyZT_3; SSID=AD3Z_HdojT17vb9H-; APISID=u5Hqq6-3-D_2nnus/Al6DxFMl15jjd947C; SAPISID=nb2uQpgkERtiHbgp/AIrl9q9c-Kj7dCqp7; ACCOUNT_CHOOSER=AFx_qI4FLHh8_7OSxZq_PxIynoOZkkEpiOy0-jqajnU3FV9oawjYDFdGSprPD2lc_V1e-x-aQX2y3v_R0gBFNXdwvX9-qREa7HwGbd9GnJypfpalSDFJ4pqRrLgsghs40OLqM_hCHMli Host accounts.google.com Referer https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=283342400864-bfsged1tjbbljuiclph3kbflc03r8uh8.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fqax.greenturtles.in%2Fauth%2Fgoogle_oauth2%2Fcallback&response_type=code&scope=email+profile&state=ddfdbd6dc92272cca3c6c2beb8684e7a7c30ad5c33e2e3a5 User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0

joffems commented 10 years ago

In https://console.developers.google.com did you enable both the Contaccts API and Goole+ API for your project?

kirantpatil commented 10 years ago

No, both APIs are disabled.

Is it necessary to enable them ?

joffems commented 10 years ago

Yes, you must enable both options for your API key.

kirantpatil commented 10 years ago

Yes, thank you, it worked now after enabling both the APIs.