I'm building a desktop app that connects to Googles APIs using OATH following the scheme found in this thread:
Google API v3 for dotnet; using the calendar with an API key
And all works fine. I have build a form that shows a WebBrowser to collect the authCode.
But how do I implement "Logout"? Can't find any API functionality for this.
Niels, you can do the following things.
- Log the user out of Google in the WebBrowser control by going to
this URL (https://accounts.google.com/Logout?hl=en)
- You can revoke the users Token by calling https://accounts.google.com/o/oauth2/revoke?token={token}
- You can further remove cookies, etc from webbrowser by calling You can
Delete cookies by calling System.Diagnostics.Process.Start("rundll32.exe","InetCpl.cpl,ClearMyTracksByProcess 2")