Reputation: 1458
I am hoping to work on a REST API that would interface with a mobile client. I am think of implementing the following flow and hope you guys can set me off in the right direction:
Is this possible? And am I heading in the right direction ?
Upvotes: 4
Views: 573
Reputation: 1332
Not only this is possible, but this is the approach which Facebook recommends. This is called "token debugging" in FB parlance.
The token will need to be checked and validated by your server, by calling the token debug Facebook api.
If you don't validate the token on the server, your app could be subject to various attacks, e.g. another developer could use a token generated on another app to gain entry.
The correct approach is:
You can manually inspect a token, in order to test your code with an online tool: https://developers.facebook.com/tools/debug/
Upvotes: 3