0

idserver에서 로그 아웃 한 MVC가 있지만 자동으로 리디렉션하지 않습니다. 나는 심지어 기본적으로 표시되는 "돌아 가기 위해 여기를 클릭하십시오"라는 메시지를받지 못합니다.IdentityServer3 로그 아웃이 시작되지 않음

여기가 나의 설정입니다. idsvr에서

는 : 공장 MVC에서

IdentityServerOptions { 
AuthenticationOptions = 
    { 
     EnablePostSignOutAutoRedirect = true, 
     SignInMessageThreshold = 3, 
     EnableSignOutPrompt = false 
    } 
} 

app.UseOpenIdConnectAuthentication (new OpenIdConnectAuthenticationOptions 
{ 
PostLogoutRedirectUri = "https://localhost:port", 
RedirectUri = "https://localhost:port", 
Notifications = new OpenIdConnectAuthenticationNotifications 
{ 
SecurityTokenValidated = HereIGetRefreshTokenEtc(), 
RedirectToIdentityProvider = n => 
{ 
    if (n.ProtocolMessage.RequestType == OpenIdConnectRequestType.LogoutRequest) 
    { 
     var idTokenHint = n.OwinContext.Authentication.User.FindFirst("id_token"); 
     if (idTokenHint != null) 
     { 
      n.ProtocolMessage.IdTokenHint = idTokenHint.Value; 
     } 
    } 
    return Task.FromResult(0); 
} 
} 
}); 

로그 아웃 컨트롤러 액션이 너무

public ActionResult Logout() 
    { 
     //Option 1 : because I have already provided redirect URI in initial configuration 
     Request.GetOwinContext().Authentication.SignOut(); 

     //Option 2: Because option 1 did not work 
     Request.GetOwinContext().Authentication.SignOut(new AuthenticationProperties { RedirectUri = "https://mymvc.site" }); 

     //none of the return statements work. (obviously i have tried them individually) 

     return RedirectToAction("Index", "Home", new{ area = ""}); 
     return Redirect("https://idsvr/connect/endsession"); 
    } 
같다 (주로 상자 구현에서) EF를 사용하여 ASPNET 정체성이다

무엇이 누락 되었습니까?

답변

2

알 수 있습니다. 클라이언트 구성의 PostLogoutRedirectUris에 링크를 추가하지 못했습니다. "유효하지 않은 게시 로그 아웃 URI"라고 말하면서 떨어졌습니다.

관련 문제