-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Role-based authorization not working correctly when using Blazor WebView in MAUI App #24874
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Closed similar issues:
|
I noticed that your
Did this work in a MAUI Blazor Hybrid App before? If so, can you please provide a minimal repro pinpointing the behavior that changed between versions and instructions on how to build and run the app in a way that demonstrates the regression between .NET 8 and .NET 9? https://github.com/pticostaricags/FairPlayCombined/tree/development/src/FairPlayCombinedSln/FairPlayTube.MAUI isn't exactly minimal. |
It used to work in another application before, with the same approach, with no need of using the event: |
Can you provide a single-project repro that clearly demonstrates what breaks after updating from .NET 8 (or whatever version it used to work in) to .NET 9 that's as minimal as you can make it? It should be published to its own repository on GitHub with a commit pointing to the working code just before the upgrade and another commit after the upgrade to .NET 9 where it breaks. The custom |
Hi @efonsecab. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate. |
Description
I have a MAUI Blazor Hybrid App which uses Role-Base authorization.
The authorization works, and roles are correctly read by the CustomAuthenticationStateProvider.
Problem is the AuthorizeRouteView is never refreshing as expected, items requiring authorization are never shown.
I tried a force reload approach, however, there seems to be a bug related to reload:
microsoft/fluentui-blazor#1036 (comment)
dotnet/aspnetcore#52119
Here is part of my code:
https://github.com/pticostaricags/FairPlayCombined/blob/development/src/FairPlayCombinedSln/FairPlayTube.MAUI/MauiProgram.cs
https://github.com/pticostaricags/FairPlayCombined/blob/development/src/FairPlayCombinedSln/FairPlayTube.MAUI/Components/Pages/Login.razor
https://github.com/pticostaricags/FairPlayCombined/blob/development/src/FairPlayCombinedSln/FairPlayTube.MAUI/Components/Layout/MainLayout.razor
Is there any solution or workaround for this behavior so I can make the authorization flow work as expected.
Steps to Reproduce
Link to public reproduction project repository
No response
Version with bug
9.0.0-rc.1.24453.9
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
Unknown/Other
Affected platforms
I was not able test on other platforms
Affected platform versions
No response
Did you find any workaround?
No workaround found yet.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: