Base solution for your next web application
Open Closed

logout issue after enabling identityserver for authorization_code oauth flow #8423


User avatar
0
[email protected] created

I have enabled IdentityServer on our ASP.NET Zero and Angular web application with the purpose of allowing a 3rd-party application to access a user's resources via an authorization_code oauth flow.

I have used the existing Angular login page as the page that IdentityServer redirects to if the user isn't authenticated, and modified the 'Authenticate' method of the 'TokenAuthController' class to sign-in the authenticated user with IdentityServer.

await _signInManager.SignInAsync(loginResult.User, false);

However, I am getting an error when attempting to subsequently log out via the Angular application. The 'Logout' method of the 'TokenAuthController' class is expecting a claim with the name 'token_validity_key' and this claim seems to no longer exist, and so the application fails to log out.

Is using the Angular login page as part of the oauth flow in this way a recommended option? If not, what do you recommend for the login/logout/consent UI elements for an oauth flow using an ASP.NET Zero application?


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    hi

    Have you see this document?

    https://docs.aspnetzero.com/en/aspnet-core-angular/latest/Infrastructure-Core-Angular-Identity-Server4-Integration

  • User Avatar
    0
    ismcagdas created
    Support Team

    This issue is closed because of no recent activity. Please create a new issue if you are still having this problem.