mercredi 25 février 2015

Authentificating API requests after user logged in via Facebook

I have a working Facebook login in my Swift app. I also have a backend server with which I want to communicate.


I am wondering how would I go about authentificating those API requests so that my app knows what person made that request.


Now, I know this is most likely done via tokens. Should I just randomly generate a string (token) when a new user logins via Facebook and then make a "registration" request to my API with said token so that it gets saved into database and I can use it from now on?


I do not want to use third-party services like Parse since I need my own backend anyways for purposes of this app.


Aucun commentaire:

Enregistrer un commentaire