Can’t get IdentityServer4 logout to work for external (Google) authentication

  • Check if TriggerExternalSignout is true in your case, if not should investigate why is that
  • If TriggerExternalSignout is already true, try
   // delete local authentication cookie
  await HttpContext.SignOutAsync();

  // Clear the existing external cookie to ensure a clean login process
  wait HttpContext.SignOutAsync(IdentityConstants.ApplicationScheme);

  // Clear the existing external cookie to ensure a clean login process
  await HttpContext.SignOutAsync(IdentityConstants.ExternalScheme);

When we logout from IdentityServer4, it just log user out from our application. It will NOT log the user out of their Google account. Google doesn’t support third party logout.

Edit: For google case TriggerExternalSignout is false as google doesnt support external logout. Ref in code

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top