2016-11-24 45 views
1

我有一個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("/"); 
    } 

回答

1

我想你已經涵蓋了這部分IdentityServer配置文檔中的所有步驟。 PostSignOutAutoRedirectDelay已經默認爲0.所以它不會得到更快的重定向回到原始URL。

我不認爲有一種方法可以完全跳過頁面,恐怕。