Skip to content
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

access_token is incorrectly called oauth_token #2

Open
fractallian opened this issue May 28, 2012 · 2 comments
Open

access_token is incorrectly called oauth_token #2

fractallian opened this issue May 28, 2012 · 2 comments

Comments

@fractallian
Copy link
Contributor

in FaceplateSession

  if (signed_request) {
      this.token  = signed_request.oauth_token;
      this.signed_request = signed_request;
  }

should read:

  if (signed_request) {
      this.token  = signed_request.access_token;
      this.signed_request = signed_request;
  }
@hiattp
Copy link

hiattp commented Jul 1, 2012

Ummm... thats not true. It clearly says oauth_token in the fbook docs (https://developers.facebook.com/docs/authentication/canvas/). And predictably it doesn't work if you try to use it with signed_request.access_token -- did you try it? Maybe its different for non-canvas apps?

Granted, it is confusing since its called access_token pretty much everywhere else except the parsed signed request.

This also causes issues in the parse_signed_request method when you check for the token (in your version this checks for data.access_token, which will never evaluate to true, at least in canvas apps):

if (data.oauth_token) {
  cb(data);
  return;
}

machunter added a commit to machunter/faceplate that referenced this issue Jul 10, 2012
the signature of the callback used by the get method was changed to
support an err parameter. this wasn't reflected in the call to me()
machunter added a commit to machunter/faceplate that referenced this issue Jul 10, 2012
the app function had the same invalid callback signature
ddollar added a commit that referenced this issue Jul 10, 2012
@pwagener
Copy link
Contributor

Anyone still looking at this? The 'parse_signed_request' method is still looking for 'access_token', when the Canvas Apps docs and the signed_request docs both clearly specify 'oauth_token'.

Is there a situation where the user's token comes into the signed request as "access_token"? Should Faceplate just check for both of them and be done with it? That's what I'm doing in my currently local fork, at least....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants