简体   繁体   English

使用Facebook登录的移动应用-如何验证用户身份

[英]Mobile app with Facebook login - how to authenticate users

This is kind of a follow-up to this question: Android Facebook login and to web server 这是该问题的后续形式: Android Facebook登录和Web服务器

Imagine a mobile app is uninstalled and then installed again or a user gets a new phone and installs the app from scratch. 想象一下,移动应用程序先被卸载然后再安装,或者用户获得新手机并从头开始安装该应用程序。 Next, the user logs in to FB and the app receives a fresh FB access_token . 接下来,用户登录到FB,应用程序将收到一个新的FB access_token

The next step is to send a "sign in" HTTP request to the backend - but we only have a fresh FB token and nothing else so the backend cannot know right away that it should log in an existing user. 下一步是向后端发送“登录” HTTP请求-但是我们只有一个新鲜的FB令牌,而没有别的,因此后端无法立即知道它应该登录现有用户。

So am I right that the backend has to hit FB API on each & every such "sign in" request from a mobile, as it can never know if it's a brand new user trying to sign up or an existing user trying to sign in? 因此,对吧,后端必须在移动设备上的每个“登录”请求上都击中FB API,因为它永远不知道是尝试注册的是全新用户还是尝试登录的现有用户?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM