question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Available Authorizations modal is empty with v5 OpenIdConnect configuration

See original GitHub issue

Running .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:closed
  • Created 4 years ago
  • Reactions:22
  • Comments:27 (3 by maintainers)

github_iconTop GitHub Comments

16reactions
capcom923commented, Jul 2, 2020

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

send-authorization-header

11reactions
Alex-Torrescommented, Feb 9, 2021

Is there an example I can follow on how to configure Swashbuckle to use OIDC?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found