Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger UI hits nonexistant breakpoint in Edge (with debugging) when returning from oauth2 authentication while any breakpoint is set in the project. #10237

Open
HunterAhlquist opened this issue Dec 11, 2024 · 0 comments

Comments

@HunterAhlquist
Copy link

Q&A (please complete the following information)

  • OS: Windows 10
  • Browser: Edge (debugging enabled)
  • Version: 7.2.0
  • Method of installation: NuGet
  • Swagger-UI version: 7.2.0
  • Swagger/OpenAPI version: 7.2.0

Content & configuration

Example Swagger/OpenAPI definition:
N/A

Swagger-UI configuration options:

SwaggerUI({
  c.SwaggerEndpoint("/swagger/v1/swagger.json", "[REDACTED] v1");
  c.OAuthClientId(ad["ClientId"]);
  c.OAuthScopes(ad["Scopes"]);
  c.OAuthUsePkce();
  c.OAuthScopeSeparator(" ");
  c.ConfigObject.AdditionalItems.Add("requestSnippetsEnabled", true);
})

Describe the bug you're encountering

In my API project that uses Microsoft/Azure oauth2 authentication, whenever I set a breakpoint anywhere in my project to debug endpoints before logging in, upon returning from the auth page, the browser appears as if a browser breakpoint was hit.

To reproduce...

Steps to reproduce the behavior:

  1. Create an API that utilizes oauth2
  2. Set a breakpoint anywhere in the project (an authorized controller for example)
  3. Attempt to log into oauth2
  4. Upon returning with authentication, SwaggerUI will show the above screen, unable to proceed

Expected behavior

The UI continues to operate as no breakpoint should have been hit after returning from authentication.

Screenshots

My IDE shows no breakpoint hit, no other tabs are open.
image

Additional context or thoughts

There are a lot of different interactions going on here, not 100% sure where this could actually be happening, SwaggerUI is my best guess. I want to use edge due to Microsoft automatically logging in to speed up debugging

@HunterAhlquist HunterAhlquist changed the title Swagger UI hits nonexistant breakpoint in browser (with debugging) when returning from oauth2 authentication while any breakpoint is set in the project. Swagger UI hits nonexistant breakpoint in Edge (with debugging) when returning from oauth2 authentication while any breakpoint is set in the project. Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant