Issuer is overriden in validation
See original GitHub issueConfirm you’ve already contributed to this project or that you sponsor it
- I confirm I’m a sponsor or a contributor
Version
4.x
Describe the bug
At the moment I am not a contributor, because Paypal has been removed from Github and I am waiting for a new credit card (not that important in Germany to have one).
I hope it is okay to report the issue anyway. I will fix this on my side soon.
I have configured a custom Issuer URL that is configured on the server side and a call to ÙseLocalServer
on the validation side. With the migration to 4.X this does not work anymore.
Basically my code looks like this:
services.Configure<OpenIddictServerOptions>((c, options) =>
{
options.IssuerUrl = "...";
});
services.AddOpenIddict()
.AddValidation(builder =>
{
builder.UseLocalServer();
});
Here is what happens in my opinion. It took me a while to figure this out:
- UseLocalServer() registers an options configurator that copies the settings from the server:
- After everything is copied the configuration validator kicks in and overrides the configuration issuer with the issuer from the options, which has never been configured:
I have added a custom configurator which issuer with the configuration issuer:
options.Issuer = options.Configuration.Issuer;
This solves the issue.
To reproduce
See above
Exceptions (if any)
No response
Issue Analytics
- State:
- Created 6 months ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Can I disable issuer validation upon resource server startup?
JwtDecoders doesn't expose any properties that instructs it to not validate the issuer on startup (source file).
Read more >Issuer validation problem · Issue #6028 · dotnet/aspnetcore
Is there a way to override thsi behavior? Add some custom issuer validatior or add "sts.windows.net" to the list of valid issuers?
Read more >7 Common Reasons Why Issuer Declines Happen
Merchants might be able to respond to or override issuer declines in some cases. That doesn't mean you should always do so, though....
Read more >Data Overrides - Examples and Validation Rules
For example, you can only override TotalSharesOutstanding with IssuerId/IssuerName. If you try to override TotalSharesOutstanding with ...
Read more >Azure APIM Validate JWT policy is not evaluating token ...
Hi all, We have a multitenant AD app setup for issuing tokens to a cloud service we run. We want to do issuer...
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 FreeTop 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
Top GitHub Comments
It will be part of the 4.2 release that will ship next week with tons of new web providers for the client stack and some interop improvements.
@SebastianStehle I just merged the fix and it’s available in the
4.2.0-preview1.23174.52
nightly builds if you’re interested in giving a try 😃Thanks again for sponsoring the project! ❤️