I have recently added OpenID login to my website. But I don't know how to add the logout feature.
For example, on clicking the Sign In button I am able to show the login form of the selected OpenID provider, for example Google Account. However, I don't know how to implement a Sign Out button to sign out of the Google Account.
Please advice.
Individual OpenID providers offer different URLs for logout to which the user can be redirected.
Google: https://www.google.com/accounts/Logout
Yahoo: https://login.yahoo.com/config/login?logout=1
There has been discussion of allowing OPs to provide these URLs as a part of the standard; see this discussion on the OpenID mailing list.