We are using auth2.0 for windows azure active directory authentication where authentication is performed on https://login.microsoftonline.com/login.srf?wa=wsignin1.0&wtrealm=...... and after successful authentication we are redirecting to our site. for logout the site we delete all the cookies generated on our site and redirect to the login.microsoftonline.com/login.srf?wa=wsignin1.0&wtrealm=....... url again but at this time we are not getting any login credentials screen and redirected to our site with access token. What process is required to logout. because if we delete all cookies or close the browser and reopen the site works and redirecting us to login.microsoftonline.com/login.srf?wa=wsignin1.0&wtrealm=........ url.
we are using following code for logout process
[NoCacheAttribute]
public ActionResult LogOut()
{
UserCookieWrapper.delete_UserCookieWrapper();
//This function delete all the datamemeber of the UserCookieWrapper class
string[] theCookies =
System.IO.Directory.GetFiles(Environment.GetFolderPath(
Environment.SpecialFolder.Cookies));
foreach(string currentFile in theCookies)
{
try
{
System.IO.File.Delete(currentFile);
}
catch(Exception objEx) { }
}
Response.Clear();
return RedirectToAction("Index", "Login");
}