Logout link with return URL (OAuth)

后端 未结 2 1403
长发绾君心
长发绾君心 2020-12-08 18:03

My application is integrated with Facebook, Google and Microsoft (using OAuth).

To logout from facebook I\'m using the following URL:

https://www.fac         


        
2条回答
  •  离开以前
    2020-12-08 18:15

    You shouldn't be logging the user out of Facebook, Google, etc. You just need to log them out of your app. By redirecting them to accounts.google.com/Logout you're actually logging the user out of their Google account, which means if they also had Gmail open in another tab (say) they'd also be logged out of that. Similarly, if you redirect them to www.facebook.com/logout.php you're actually logging them out of Facebook, which means if they had Facebook open in another tab, they would be logged out of there as well.

    Instead, all you should do, when the user logs out of your app, is "forget" the OAuth tokens.

提交回复
热议问题