A lot of questions here are talking about validation process of Facebook access token
on the server side. I am bit confused how is still secure?
My client and server flows are:
Continue with Facebook
using Mobile SDK
on the client side.User access token
to the client side.user access token
(via POST method) and validate the access_token
using Graph
API.JWT
authorization token in responseendpoint
and pass the new access_token
to the hacked endpoint.What will happen if 5th
point gets executed? It's difficult to hack the POST
parameters but it might be possible after decompiling the app and see the classes file (At least for android apk). In this case, Server will not recognize the forged request and will always return the JWT Authorization
token to make further calls.
The validity of Facebook access_token
is 60 days. Do I need to provide an extra layer of security at the time of validation endpoint to make sure that the request is only coming from the application?
Is facebook user access_token
always changing whenever a user is requesting to sign in?
Any kind of help would be appreciable. Thanks
Solution:
Generated access_token
will always belongs to an App. To verify it pass the access_token
and app_token
in:
https://graph.facebook.com/debug_token?
access_token=ACCESS_TOKEN
&app_token=APP_TOKEN