简体   繁体   English

当用户未授权应用程序时如何从Facebook注销

[英]How to logout user from the Facebook when he does not authorize the application

I have ASP.NET web application that 我有ASP.NET Web应用程序

  1. Runs on public computers 在公共计算机上运行
  2. Allows users to register by using their Facebook accounts. 允许用户使用其Facebook帐户进行注册。
  3. Must always logout a user from the Facebook after registration has been completed. 注册完成后,必须始终从Facebook中注销用户。

Registration process contains the following steps: 注册过程包含以下步骤:

  1. Registration page is shown with the Facebook icon. 注册页面显示为Facebook图标。
  2. When user clicks on the Facebook icon, he is redirected to the Facebook web site. 当用户单击Facebook图标时,他将被重定向到Facebook网站。
  3. On the Facebook site user enters his email and password and clicks login. 在Facebook网站上,用户输入他的电子邮件和密码,然后单击登录。
  4. On the Facebook site user clicks Allow to authorize my application. 在Facebook网站上,用户单击允许对我的应用程序进行授权。
  5. User is redirected to my application. 用户被重定向到我的应用程序。
  6. The application registers used in the database. 应用程序在数据库中使用的寄存器。
  7. The application calls FB.logout in order to logout from the Facebook. 该应用程序调用FB.logout以便从Facebook中注销。 So when new user starts registration he cannot use account of previous user. 因此,当新用户开始注册时,他不能使用先前用户的帐户。

The application works perfect until user clicks Cancel at step 4. When this happens, the browser is redirected to my application, the user remains signed into the Facebook but the application is not authorized by this user. 该应用程序可以正常运行,直到用户在步骤4中单击“取消”为止。发生这种情况时,浏览器将重定向到我的应用程序,该用户仍登录到Facebook,但该应用程序未获得该用户的授权。 This means that the application cannot logout this user from the Facebook by using the FB.logout method because the application does not have access token. 这意味着应用程序无法使用FB.logout方法从Facebook中注销该用户,因为该应用程序没有访问令牌。

How to logout from the Facebook in this case? 在这种情况下如何从Facebook注销?

Thank you. 谢谢。

How to logout from the Facebook in this case? 在这种情况下如何从Facebook注销?

Not possible at all. 根本不可能。

If logging a user out without a valid access token was possible, then every website I'm visiting could do that if they liked – I'm sure you can see how annoying that'd be to users, and that it's therefor not possible. 如果可以在没有有效访问令牌的情况下注销用户,那么我正在访问的每个网站都可以这样做,如果他们愿意的话–我敢肯定,您会看到这会对用户造成多大的烦恼,并且这是不可能的。

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

相关问题 关闭浏览器时如何让用户注销 - How to get user logout when he close browser FB.logout()不注销Facebook用户 - FB.logout() does not logout facebook user 从应用程序FB.logout()中注销用户,而不是从Facebook中注销 - Logging out user from application FB.logout() not facebook Facebook注销导致我的应用程序注销 - Facebook Logout causes logout from my application 关闭页面时无法在 firebase 上注销用户 - Cannot logout user on firebase when he close the page 想要通过在用户输入错误时阻止用户在文本字段中输入任何空格 - Want to prevent user from entering any space in textfield by providing error when he does 区分未登录的Facebook用户与已登录的Facebook用户,但尚未授权我们的应用程序 - Differentiate a not-logged-in Facebook user vs. a logged-in Facebook user but not authorize our application yet 谷歌登录按钮 > 如果用户点击谷歌按钮,如何注销用户 - Google Sign-In button > How to logout user if he clicks on the google buttons 如果用户使用与注册不同的 FB 帐户,如何限制对 facebook API 的访问 - how to restrict access to facebook API (from JS dialog) if the user is using different FB account than he sign up 如何在Facebook页面标签中授权用户? - How do I authorize the user in a facebook pages tab?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM