-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Description
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


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:
- Run the application in debug
- Authenticate with OIDC provider
- Restart application in debug
- 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


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