Skip to content

Debugger paused in another tab post OIDC authentication refresh #10525

@Jason1269

Description

@Jason1269

OidcTest.zip

Q&A (please complete the following information)

  • OS: Windows
  • Browser: Google Chrome, MS Edge
  • Version: don't know
  • Method of installation: dist assets
  • Swagger-UI version: 5.26.2
  • Swagger/OpenAPI version: OpenAPI 3.0

Content & configuration

See attached sample. It should be runnable by opening the .sln file with Visual Studio Community Edition and adding valid OIDC settings, found in Program.cs

Image Image

Describe the bug you're encountering

Swagger-ui authentication with OIDC happens in a separate tab and listens for the post-auth response. This works fine when there is no previous session, or when the previous session refresh is "slow". However, if the refresh happens too quickly, swagger-ui misses the response and hangs indefinitely

To reproduce...

Steps to reproduce the behavior:

  1. Run the application in debug
  2. Authenticate with OIDC provider
  3. Restart application in debug
  4. When OIDC session refreshes very quickly Swagger tab hangs indefinitely waiting for OIDC post back

Expected behavior

OIDC response should be captured regardless if the session refresh is fast or slow

Screenshots

Image Image

Additional context or thoughts

This is a timing problem, it happens intermittently and only when there is previous OIDC login and the session refresh happens too quickly for the listener to startup and capture the response from the OIDC provider

The attached project uses AUTH0 provider, although this is a .NET Web API project, it is consuming swagger-ui via Swashbuckle.AspNetCore. As per the maintainers this is a swagger-ui javascript issue: domaindrivendev/Swashbuckle.AspNetCore#3491 (comment)

This was also reported in Visual Studio forum with the explanation of the problem and workaround:
https://developercommunity.visualstudio.com/t/Debugger-paused-in-another-tab/10664323#T-N10857758

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions