I have follewed this documentation, Protected content in the Delivery API | Umbraco CMS the path to use to use external identity providers.
So the setup is
Azure Container app witch running NextJs
Azure web app with is running the delivery api.
So everything is working fine, but when the client (NextJs) navigate to /my-page and needs to login the some funky shit is happing. The I am using NextJs.Auth witch sends the challange to Umbraco, and Umbraco sends my to the external identity providers (MitId) and comes back to Umbraco and umbraco deliveres a accesstoken back to nextJs and now i can see /my-page.
Everythings works! Great! Then i push my code to the dev setup, same story everything works everybody happy, same as Test. But on production is an other story.
Nothing works.
Peopel navigate to /my-page go to MitID logs on and then unauthized.
I can see in the log the successfully logs in, the successfully obtiane a token furthe the endpoint /umbraco/delivery/api/v1/security/member/token and successfully get user data futhe this endpoint /umbraco/delivery/api/v1/security/member/userinfo
but when this endpoint is hit umbraco/delivery/api/v2/content/item/${path}?expand=all
and headers Authorization: `Bearer is set with the accesstoken i get an exception:
{"@t":"2025-04-09T10:42:57.6235119Z","@mt":"The event {EventName} was marked as rejected by {HandlerName}.","@l":"Debug","@tr":"34eba3efbb755d84b511ffbd6f4d1e8a","@sp":"1b9dec04e3d82297","EventName":"OpenIddict.Validation.OpenIddictValidationEvents+ProcessAuthenticationContext","HandlerName":"OpenIddict.Validation.OpenIddictValidationHandlers+ValidateRequiredTokens","SourceContext":"OpenIddict.Validation.OpenIddictValidationDispatcher","ActionId":"8be6088e-637b-4c3b-9c00-aa6c88548de9","ActionName":"Umbraco.Cms.Api.Delivery.Controllers.Content.QueryContentApiController.QueryV20 (Umbraco.Cms.Api.Delivery)","RequestId":"40004ae3-0001-f600-b63f-84710c7967bb","RequestPath":"/umbraco/delivery/api/v2/content","ProcessId":6804,"ProcessName":"w3wp","ThreadId":48,"ApplicationId":"ea6c9907b5dfb977abd279e5dd977d85f29f78cb","MachineName":"WN1SDWK00030C","Log4NetLevel":"DEBUG","HttpRequestId":"1b7992c5-cca4-4c32-a96a-10943506d97c","HttpRequestNumber":6433,"HttpSessionId":"3d126f9d-9646-d3d0-f378-f86818007e3e"}
{"@t":"2025-04-09T10:42:57.6235231Z","@mt":"AuthenticationScheme: {AuthenticationScheme} was not authenticated.","@l":"Debug","@tr":"34eba3efbb755d84b511ffbd6f4d1e8a","@sp":"1b9dec04e3d82297","AuthenticationScheme":"OpenIddict.Validation.AspNetCore","EventId":{"Id":9,"Name":"AuthenticationSchemeNotAuthenticated"},"SourceContext":"OpenIddict.Validation.AspNetCore.OpenIddictValidationAspNetCoreHandler","ActionId":"8be6088e-637b-4c3b-9c00-aa6c88548de9","ActionName":"Umbraco.Cms.Api.Delivery.Controllers.Content.QueryContentApiController.QueryV20 (Umbraco.Cms.Api.Delivery)","RequestId":"40004ae3-0001-f600-b63f-84710c7967bb","RequestPath":"/umbraco/delivery/api/v2/content","ProcessId":6804,"ProcessName":"w3wp","ThreadId":48,"ApplicationId":"ea6c9907b5dfb977abd279e5dd977d85f29f78cb","MachineName":"WN1SDWK00030C","Log4NetLevel":"DEBUG","HttpRequestId":"1b7992c5-cca4-4c32-a96a-10943506d97c","HttpRequestNumber":6433,"HttpSessionId":"3d126f9d-9646-d3d0-f378-f86818007e3e"}
i have dobbel, trippel check everything but can not see the error.
can somebody help me?