Use Facebook authentication token in API

邮差的信 提交于 2019-12-10 21:24:32

问题


I'm having an iOS app where the user authenticates with Facebook on the device and also communicating with my server API.

Authentication

Today I'm sending the Facebook user access token (over SSL) and the server verifies the token with Facebook. Thats the authentication mechanism for the API.

Session token

Instead of using a generated token to user for all future API calls, I use the Facebook access token as the session token as well. This makes it a lot easier on the device as you don't have to care about first getting the token and then call the API. You just send the Facebook token in each call, easy.

Is this a good solution when authenticating with Facebook towards an API?

来源:https://stackoverflow.com/questions/18336400/use-facebook-authentication-token-in-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!