jeudi 5 mai 2016

Authorization for mobile app using Larvel 5 and Facebook OAuth

I'm working on back-end part for mobile application. The back-end will be a RESTful API. The main question for me - it's authorization/authentication users.

We will use the Facebook authorization (Facebook SDK for iOS) on the mobile application side. The main question here is: how to implement authorization on back-end side using only data we can get from Facebook?

Maybe someone already got some solutions or can provide some examples for this task?

I can imagine this process as:

  1. User press the "Login with FB" button in the application and getting the redirect to FB, where he approve the connect

  2. User returns to the application with some data from FB (user Facebook ID, some user data and authorization token)

  3. Application sends this data to the API and trying to register/authenticate the user

  4. API save the authorization token and then use this token for check the user when application send the requests to API

Am I correct or this logic is wrong? Please advise, and if possible provide some examples.

Also I'm found this guy, but not sure it will be helpful in my situation...



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1q1PfOh
via IFTTT

Aucun commentaire:

Enregistrer un commentaire