My application is integrated with Facebook, Google and Microsoft (using OAuth).
To logout from facebook I'm using the following URL:
https://www.facebook.com/logout.php?next=[YourAppURL]&access_token=[ValidAccessToken]
Is there something similar for Google and for Microsoft?
For Google I tried:
https://accounts.google.com/Logout?continue=http://localhost:51820
But it didn't work... It returns: The page you requested is invalid.
How can I get that URL logout?
I finally got the right links:
https://www.facebook.com/logout.php?next=[YourAppURL]&access_token=[ValidAccessToken]
Source: A Working Facebook OAuth Logout URL
https://www.google.com/accounts/Logout?continue=https://appengine.google.com/_ah/logout?continue=[http://www.mysite.com]
Source: google account logout and redirect
https://login.live.com/oauth20_logout.srf?client_id=[CLIENT_ID]&redirect_uri=[REDIRECT_URL]
Source: Server-side scenarios
Those links can be use like that in JavaScript:
function logout (){
document.location.href = "https://www.facebook.com/logout.php?next=[YourAppURL]&access_token=[ValidAccessToken]";
}
Suggestion to implement this: Logout from external login service (Gmail, facebook) using oauth
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With