Authenticate user serverside from stand alone application

≯℡__Kan透↙ 提交于 2019-12-11 12:26:27

问题


We have a separate app, a completely stand alone site. We use facebook for simplified login.

We do the following right now

  1. show fb login
  2. authenticate user with fb javascript
  3. create our own account in our db and link it with their fb id.

all that works great. But now the user goes to a new computer, he first visits fb and logs in. He then goes to our site. Since we are pre-approved before we want to automatically log the user in with our own account.

So, simple question, how can i serverside (not javascript) check if the user is authenticated logged in with fb and also approved our app. I have the users fbID


回答1:


Common way to check user authentication is to use Javascript SDK, its FB.init function. This function makes request to http://www.facebook.com/extern/login_status.php which return authentication info. I think, you can do this request serverside.



来源:https://stackoverflow.com/questions/4760406/authenticate-user-serverside-from-stand-alone-application

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