Available Authorizations modal is empty with v5 OpenIdConnect configuration
See original GitHub issueRunning .Net Core 2.2 and Swashbuckle.AspNetCore 5.0.0-rc2.
Trying to setup OIDC configuration, but the Available Authorizations modal is blank, so cannot proceed with authentication.
Configuration as follows:
services.AddSwaggerGen(c => {
...
c.AddSecurityDefinition("token", new OpenApiSecurityScheme {
Type = SecuritySchemeType.OpenIdConnect,
OpenIdConnectUrl = new Uri($"https://login.microsoftonline.com/{tenant}/v2.0/.well-known-openid-configuration")
});
c.AddSecurityRequirement(new OpenApiSecurityRequirement {
{
new OpenApiSecurityScheme {
Reference = new OpenApiReference {Type = ReferenceType.SecurityScheme, Id = "token"
}, new string[] { }
}
});
...
});
services.UseSwaggerUI(c => {
...
c.OAuthClientId(_clientId);
...
});
Issue Analytics
- State:
- Created 4 years ago
- Reactions:22
- Comments:27 (3 by maintainers)
Top Results From Across the Web
Available authorization modal on swagger-ui is not ...
Problem: When I click 'Authorize' button on swagger UI, 'Available authentication' modal is empty. So far: I have set up security scheme as ......
Read more >AM 5 > OpenID Connect 1.0 Guide
The OpenID Connect Authorization Code Flow specifies how the relying party interacts with the OpenID Provider, in this case OpenAM, based on use...
Read more >OpenID Connect & OAuth 2.0 API
This request authenticates the user and returns tokens along with an authorization grant to the client application as a part of the callback...
Read more >Enable an OpenID Connect client for an application
The OpenID Connect client receives the authentication response, verifies it and retrieves the access , identity , and userinfo tokens by using the...
Read more >Use OpenID Connect as an OAuth 2.0 authentication ...
The OpenID Connect provider asks you to sign in and authorize the GitLab application if confirmation is required by the client. You are...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I met the same issue before and resolved it.
Now the available Authorization header works fine.
Please check my latest sample using SwashBuckle v5.5.1 and netcore 3.1 https://github.com/capcom923/MySwashBuckleSwaggerWithJwtToken
Is there an example I can follow on how to configure Swashbuckle to use OIDC?