I am having an issue that I have been struggeling with for quite some time now. I want only part of my client blazor server to need duende Authorization. I have done this with adding @attribute [Authorize] or [AllowAnonymous], and when it needs autorization it goes into my App.Razor, and the cascadingauthenticationstate checks if it is not authroized. If not it goes into my RedirectTologin component I'll show here: App.Razor: https://pastebin.com/vTrzFD35 RedirectToLogin.razor https://pastebin.com/ZHgMxBzh
This works as expected, and it goes into duende login. The login is logging in successfully . After a successfull login the duende is supposed to redirect to authentication/login-callback, and it does. It even sets the cookies in my browser, ".AspNetCore.Identity.Application", "idsrv.session" and the ".AspNetCore.Antiforgery.VMx79YeDpl8"
The problem is that the user is never authenticated, even if we all agree on the authentication process on the duende side seems to be correct. The user object when printed out looks something like this: https://pastebin.com/cLVgmEFN