N
N
Niemand2015-02-22 13:05:40
Facebook
Niemand, 2015-02-22 13:05:40

How to authenticate user on your server after Facebook Login?

Hello,
I've been rummaging through the FB docks for the 3rd day and can't find answers to my questions.
Given: An application that uses Email and Password to authenticate users.
Required: add FB authentication.
Problems:
1. When requesting a login, you can specify Permissions, including Email, but users can hide it. What should I do if Email is required for the application to work? (Apparently nothing, or make an additional request)
2. After login, we receive an AuthToken from the FB, with which we need to authenticate the user on the server. How can the server check which user the token belongs to if the token has changed since the last login?
3. Is it possible to compare the transmitted data with the data on the FB server?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sintez, 2015-02-22
@sintez

1. Then you will then need to show the user the "Enter your email" form. FB also has a mechanism for re-requesting permissions , but it seems to me that the option with a form and a forced email request is more correct.
2. You can verify the received token by calling the FB Graph API. The response will include user_id. https://developers.facebook.com/docs/facebook-logi...
3. It's not entirely clear what you mean

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question