I am working on SSO these Days, We have a main application lets call it A, from where user is login and then using SSO User can access multiple applications related to application A.If user is logout from Application A, then user should be logout from all associated application as well and then redirected back to A's login page. The issue where I am stuck there is one application B which is associated with application A. To logout this application (B) we have to hit a url which logs out the application B. Problem is that when I hit this url from browser the application B logout successfully, but when I try to hit the url from code logout is not working. I have tried following solutions but its is not working
- I have tried to hit url using web request.
- I have tried Response.Redirect, Redirect, RedirectToAction.
- It works when i use below code, but i don't want user to see Application B's logout page which currently user view when logout from main application.
I don't want user to see Application B logout page, instead it should see Application A logout page. Is there any way to hit that url so it logouts the application b? below is my code. Some one told me to open this url in hidden i-frame. I don't how to do this in controller. Below is the code
Blockquote
public IActionResult Logout() {
string urlLogout = "application/logout.action";
var abc = Redirect(urlLogout); //it's is not working
return Redirect(urlLogout); //it work's fine
}
Redirectdoesn't call anything, it sends a temporary Redirect response (302) to the browser