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

Unable to validate the 'id_token', no suitable ISecurityTokenValidator was found for: ''." #11

Open
adsengineer opened this issue Feb 7, 2020 · 2 comments

Comments

@adsengineer
Copy link

adsengineer commented Feb 7, 2020

I am getting this error when using WebCodeFlowPkceClient. I have configured all the parameters and succeed in getting authorization code and token, but after that above error is showing. Can you, please, help me? Am I doing something wrong?
Those are my parameters:
options.ClientId = config["Connection:ClientId"];
options.ClientSecret = config["Connection:ClientSecret"];
options.Scope.Clear();
options.Authority = config["Connection:Uri"];
options.CallbackPath = new PathString("/signin");
options.SignInScheme = "Cookies";
options.RequireHttpsMetadata = true;
options.ResponseType = "code";
options.ResponseMode = "query";
options.UsePkce = true;
options.SaveTokens = true;
options.GetClaimsFromUserInfoEndpoint = true;

@damienbod
Copy link
Owner

Do you still have this problem, validating this and cannot reproduce. Is this a different repo?

Greetings Damien

@pekaaw
Copy link

pekaaw commented Oct 11, 2023

I experienced pretty much the same thing, authenticating with Azure AD B2C. To figure out the problem I added temporary code to log the IdToken and AccessToken. In my case the IdToken was empty, and I figured out that I had not granted admin consent to the openid permission. For @adsengineer it looks like the IdToken is only a dot '.', so not a valid IdToken.

When I granted admin consent I managed to log in successfully with Authorization Code Flow, using .NET Framework 4.7.2 with the Microsoft.Owin.Security.OpenIdConnect package.

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

3 participants