I'm trying to reproduce the example for OpenIddict 3.x, however when I test with a js client, postman or mobile client (Android) always I get the same error The OpenID Connect request cannot be retrieved, it means when I do a request for connect/token/ this value HttpContext.GetOpenIddictServerRequest() is null, but I don't know how to fill it, the code is the same than the repository so I don't need to share here, thank you for your answer, I will be looking forward...
Does your code call options.UseAspNetCore().EnableTokenEndpointPassthrough()? Are you sure the route exactly matches the registered endpoint path?
yes, of course,
// Register the ASP.NET Core host and configure the ASP.NET Core-specific options.
options.UseAspNetCore()
.EnableTokenEndpointPassthrough()
.DisableTransportSecurityRequirement(); // During development, you can disable the HTTPS requirement.
totally, I am using the correct endpoint, when I have to migrate always there are a lot of bugs, because the code change completely so I decided to use Identity Server 4, thanks
totally, I am using the correct endpoint, when I have to migrate always there are a lot of bugs
Yet you're the only one impacted by that bug, that may be in OpenIddict... or in your code.
And luckily, no, the number of bugs reported so far is quite low, specially considering the quite massive refactoring.
so I decided to use Identity Server 4, thanks
Excellent choice. Since you'll benefit from another free OSS project, consider contributing or sponsoring it.
totally, I am using the correct endpoint
And BTW, no, you're not using "exactly the same address": /connect/token/ is different from /connect/token. In 3.x, the logic that treated such paths as identical was not ported from 2.x but I'll consider changing that to make migration easier.
thank you for everything, the support is so good, I really appreciate your work here, and I like working much more with this library but sadly I had to change
Excellent choice. Since you'll benefit from another free OSS project, consider contributing or sponsoring it.
I'm gonna keep that in mind
This is probably really embarrassing on my side, but I stumbled upon the same issue and the problem was, that I was missing a preceeding "/", when defining the TokenEndpointUrl:
options.SetTokenEndpointUris("api/connect/token")
This leads to Openiddict not resolving the Enpoint Type and thus the Request from GetOpenIddictServerRequest() is null. When I am defining it as:
options.SetTokenEndpointUris("/api/connect/token")
Then everything works as expected.
@kevinchalet Thanks for the great library and documentation. It was a joy to get started with it.
@bytefish thanks!