dotnet / eShop

A reference .NET application implementing an eCommerce site
MIT License
6.21k stars 1.82k forks source link

OpenIdConnectProtocolException: Message contains error: 'invalid_request', error_description: 'Invalid redirect_uri', error_uri: 'error_uri is null'. #609

Open denniske opened 1 day ago

denniske commented 1 day ago

After following the steps for starting the app in the readme, I get the following error after clicking on basket or user profile icon in web app: OpenIdConnectProtocolException: Message contains error: 'invalid_request', error_description: 'Invalid redirect_uri', error_uri: 'error_uri is null'.

Image

These are the logs from the identity api:

Image Image

Is there some configuration or license I am missing?

m1 mac, dotnet 9 rc2

denniske commented 1 day ago

I have now disabled EnablePushedAuthorizationEndpoint https://docs.duendesoftware.com/identityserver/v7/tokens/par/#licensing

https://docs.duendesoftware.com/identityserver/v7/tokens/par/#licensingbuilder.Services.AddIdentityServer(options =>
{
    options.Endpoints.EnablePushedAuthorizationEndpoint = false;
})

I get another error:

Sorry, there was an error : invalid_request Invalid redirect_uri Request Id: 0HN7UD6CJ4U2S:00000069

Image

Logs:

Image

Invalid redirect_uri: https://localhost:60384/signin-oidc
{
  "ClientId": "webapp",
  "ClientName": "WebApp Client",
  "AllowedRedirectUris": [
    "https://localhost:7298/signin-oidc"
  ],
  "SubjectId": "anonymous",
  "RequestedScopes": "",
  "PromptMode": "",
  "Raw": {
    "client_id": "webapp",
    "redirect_uri": "https://localhost:60384/signin-oidc",
    "response_type": "code",
    "scope": "openid profile orders basket",
    "code_challenge": "OHQcoSxx31XgbUbIp3JrPPuD-DA1hX8WyX0yHuQ5k58",
    "code_challenge_method": "S256",
    "response_mode": "form_post",
    "nonce": "638664976676456810.YzJhN2FlYWMtOGQwYi00MDk3LTlmOTYtNjdmOWQxNjAyNzdlNDNmZjYwMTMtOGJkOS00MWNiLTllMDAtYzVmMGQxOGIwOGRi",
    "state": "CfDJ8KetQ21Jrj9AnkSl9Qs1VyrmkgmGt1qE4F3_D3sFquJmy2NBhh8_0TpnenuP54ny2xThmCGIuDpi3o3azlQiwOL_d2-i1f0jsaPk8-zYq_CcnOfSsF5s7PBkWczRLX0cmYGB9j99Zbj7kn3zJfmvWE8O6DueiBci8AHKT39T-kkzAs423TagdK773gNWFqE_NJ-9Z9DmaFnDMdr3bN1HIPi5GC4Nut4Y8eIhU1Uzf-bR-VITFkHVO5A5FQvq60WenYFrUYddSWIVum0APwIK6D-E9cqh9GCYPqpMU7zENHb4zspQgm6wo-EymMp6ErCFWd1PvuCwqWaPCWvjwzMHDkmfqXeLx9UbMdHe6-g8NCv1jT74B8GQxKY4hGSraKXgsaSaeJvfhXgE8iZnDExAQbk",
    "x-client-SKU": "ID_NET9_0",
    "x-client-ver": "8.0.1.0"
  }
}