我有一個IdentityServer選項來重定向,無需登錄propt。IdentityServer直接註銷重定向到一個頁面
var options = new IdentityServerOptions
{
// other options ....
AuthenticationOptions = new AuthenticationOptions
{
EnablePostSignOutAutoRedirect = true,
EnableSignOutPrompt = false,
}
};
當我註銷,系統重定向我有這樣的消息的identityserver頁「你註銷。」但此頁面顯示時間很短,我正在重定向到登錄頁面。登出時是否可以跳過此身份服務器頁面?
我這樣的註銷控制器。
public ActionResult Logout()
{
if (Request.GetOwinContext().Authentication.User.Identity.IsAuthenticated)
{
var properties = new AuthenticationProperties
{
RedirectUri = "https://localhost:33125/"
};
Request.GetOwinContext().Authentication.SignOut(properties);
}
return Redirect("/");
}