asp.net-mvc-4 – 带有返回URL的注销链接(OAuth)

我的应用程序与Facebook,Google和Microsoft(使用OAuth)集成.

要从facebook注销,我使用以下网址:

https://www.facebook.com/logout.PHP?next=[YourAppURL]&access_token=[ValidAccesstoken]

谷歌和微软有类似的东西吗?

对于谷歌,我试过:

https://accounts.google.com/logout?continue=http://localhost:51820

但它不起作用……它返回:您请求的页面无效.

如何获取该URL注销?

解决方法

我终于得到了正确的链接

> Facebook:

https://www.facebook.com/logout.PHP?next=[YourAppURL]\u0026amp;access_token=[ValidAccesstoken]

资料来源:A Working Facebook OAuth Logout URL

>谷歌:

https://www.google.com/accounts/logout?continue=https://appengine.google.com/_ah/logout?continue=[http://www.mysite.com]

资料来源:google account logout and redirect

>微软:

https://login.live.com/oauth20_logout.srf?client_id=[CLIENT_ID]\u0026amp;redirect_uri=[REDIRECT_URL]

资料来源:Server-side scenarios

这些链接可以像JavaScript一样使用:

function logout (){
document.location.href = "https://www.facebook.com/logout.PHP?next=[YourAppURL]&access_token=[ValidAccesstoken]";
}

建议实施:Logout from external login service (Gmail,facebook) using oauth

相关文章

这篇文章主要讲解了“WPF如何实现带筛选功能的DataGrid”,文...
本篇内容介绍了“基于WPF如何实现3D画廊动画效果”的有关知识...
Some samples are below for ASP.Net web form controls:(fr...
问题描述: 对于未定义为 System.String 的列,唯一有效的值...
最近用到了CalendarExtender,结果不知道为什么发生了错位,...
ASP.NET 2.0 page lifecyle ASP.NET 2.0 event sequence cha...