We are creating mobile applications (iOS and Android) that require a REST API and Facebook integration for authentication.
I am still confused by what is the best architecture design for this kind of use.
The main question: Who is responsible for authentication / authorization via Facebook, client or server?
Option A: The client authenticates to the FB. The client sends requests using the token received from Facebook. The server uses this token to identify the user.
Option B: The server authenticates to the FB for the benefit of the client.
Additional notes (may or may not be relevant):
- I am developing a part of the REST API using Django.
- An application will need access to Facebook users so that we can invite them to use this application.
source
share