-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This authorization code has been used #128
Comments
A stacktrace would be helpful. It sounds like an authorization code is being used multiple times. Make sure you exchange the code for a token once and then store the token. |
It's happening every time I call the current_facebook_user object. I am not storing any session variables manually. Should I? BTW: I am using facebooker2. I guess I am suppose to post this in there. I just noticed it, My bad. Here is my stack trace, there is not a lot:
Here is my current_user method:
Thank you |
That seems awfully incomplete, since the call should be somewhere inside current_facebook_user. Basically, once you use a code, you need to cache the token info and inflate the session yourself. |
current_facebook_user is implemented under facebooker2. So, I am not sure how that works. I will take a look. However it looks like an issue with Facebook. Other users are facing similar issues too. According to their december update or something. |
It is implemented under facebooker, but getting that stacktrace is still helpful. Mike On Dec 8, 2012, at 5:48 PM, Menan Vadivel [email protected] wrote:
|
Sorry bro, I am pretty new to rails haha. I thought that was the stack trace. Here is where things are going wrong in facebooker.
|
This means you are using the code passed in from Facebook multiple times. What I've done is to instead have a special URL that the oauth code sends the login to. In there, I get the client information using the following code:
The rest of our application then looks for the access token and the user id and uses them to create the facebook user and session. Mike On Dec 10, 2012, at 1:08 PM, Menan Vadivel [email protected] wrote:
|
I've got it to work with the custom current_facebook_user method using the session token like you said. You might want to fix the facebooker though. It seems broken. Thanks for your help. |
I don't do anything with Facebook anymore, so I'd rather somebody who has a real world test case to send a patch. Mike On Dec 10, 2012, at 3:00 PM, Menan Vadivel [email protected] wrote:
|
Sounds good :) I am not smart enough to fix your code man sorry. |
I keep getting this exception for only last couple days. What do you think it could be?
Mogli::Client::OAuthException (This authorization code has been used.)
The text was updated successfully, but these errors were encountered: