Closed arief-hidayat closed 12 years ago
Hi There,
Can you provide me a full config code example, or a sample app?
Cheers, Antony
On 9 July 2012 09:43, arief hidayat reply@reply.github.com wrote:
Hi,
I get this 500 error message
No OAuth token in the session for provider 'twitter'!
Here's twitter my config:
successUri = "http://recordeed.com/oauth/success?provider=twitter" failureUri = "/unauthorized" callback = "http://recordeed.com/oauth/twitter/callback"
the callback matches with the setting in twitter app.
URL mapping
"/oauth/$provider/callback/"(controller: "springSecurityOAuth", action: "onSuccess")
I'm running my local environment: grails 2.1.0 (I tested using 2.0.3 also) intelliJ IDEA 11 ubuntu 12.04 + nginx
The session is empty. The same errors occurs for my facebook provider. Please let me know if you can help. Thanks :)
Reply to this email directly or view it on GitHub: https://github.com/aiten/grails-oauth-scribe/issues/13
ꜽ . antony jones . http://www.enzy.org
Thanks for fast reply.
I just commited https://github.com/arief-hidayat/recordeed.
currently I set my etc/hosts
127.0.0.1 localhost recordeed.com www.recordeed.com
and I set my nginx to
listen 80;
server_name recordeed.com www.recordeed.com;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
proxy_pass http://grails_server/recordeed/;
}
and then, in my browser I try to access recordeed.com/oauth/%provider%/authenticate
BTW, you should not commit your key, secret to your code repo. Use external configs :-)
ups. thanks. I forgot about that. I reset the keys first.
Hi Guys,
Hoping to look into this problem tomorrow morning, apologies for the delay!
Hi Arief,
I got your app up and running and it seems to work fine. I think you need to check carefully that the URL in your browser when you click connect is the same exact domain and port as your callback. I can't see anything which is causing your application to have an empty session other than that.
My session contains:
Session Content: facebook:oasAccessToken = Token[AAAGUleCTyjoBAG2cjeZAmoNcB9u4EPFOIpCyMTKdvNOnvWfZAXluMU04CUMZCznuLdDE0wXP91E6ZCO13NDjFdhWK4lR9GFbfYHPJkKdEAZDZD , ]
I'll commit my changes just in case they are of any help to you at all.
Thank you.
I changed http://recordeed.com/
to 127.0.0.1 and update the twitter app setting accordingly (without going thru nginx). And it works. I suspect it's the nginx configuration that cause the session data lost. my bad.
Hi,
I get this 500 error message
No OAuth token in the session for provider 'twitter'!
Here's the twitter config:
successUri = "http://recordeed.com/oauth/success?provider=twitter" failureUri = "/unauthorized" callback = "http://recordeed.com/oauth/twitter/callback"
the callback matches with the setting in twitter app.
URL mapping
"/oauth/success"(controller: "springSecurityOAuth", action: "onSuccess") "/oauth/$provider/callback/"(controller: "oauth", action: "callback")
I'm running my local environment: grails 2.1.0 (I tested using 2.0.3 also) intelliJ IDEA 11 ubuntu 12.04 + nginx
After debugging the
springSecurityOAuth
controller, I found that the session is empty. The same errors occurs for my facebook provider. Please let me know if you can help. Thanks :)