Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7908501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:58:28+00:00 2026-06-03T11:58:28+00:00

The JS API’s FB.login method returns a response with a dictionary of user info,

  • 0

The JS API’s FB.login method returns a response with a dictionary of user info, including the user id. That exists client-side in the JS api.

If this is going to be sent back to the server running the facebok canvas app, the server has to trust the user id hasn’t been tampered with. As there is no signed checksum that comes back with the response, I can’t see how this can be guaranteed.

I can see how you could take the user ID from the POST signed request and store that in a session, but that doesn’t seem quite right. I’m sure there’s a method for doing this securely that’s less baroque than that.

Ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T11:58:30+00:00Added an answer on June 3, 2026 at 11:58 am

    You should use the Server-Side authentication for the server.

    When the user loads your app and has yet to authenticate you send him to the auth dialog, when he returns you get a code which you then exchange against the facebook servers to get an access token back, you can then query the graph api for “/me” and get the user data, since you get it from the facebook servers you know it’s ok.

    In addition, when facebook POSTS to your canvas url you get a signed request which was signed using your app secret, after you decode it you can then check it against your secret key to verify it’s authenticity.
    In addition the signed request has the user id so you know that’s secured as well.

    I recommend using both the server side authentication and the client side one, you get different tokens (server is 60 days long, and the client is a few hours) and you can use them both.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Facebook API can give the pages a user admins. Suppose that it returns me
On google-api-java-client exists an annotation @Key that it's used for parsing nodes on an
The api for ServletContext#getRequestDispatcher() says: This method returns null if the ServletContext cannot return
Mockito api provides method: Mockito.verifyNoMoreInteractions(someMock); but is it possible in Mockito to declare that
This API: /// Returns a list iterator of the elements in this list (in
The API doc says This reference type differs from the others in that it
http://api.jquery.com/event.preventDefault/ If this method is called, the default action of the event will not
API publisher added new field to their response object that isn't in my model
Facebook API: How to let the php knows whether the user is a fan
The API gives the code as: public function up() { $this->addColumn('table_name', 'column_name', 'string', $options);

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.