Skip to content
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

AuthorizeView not work in blazor .net 8 #60189

Open
MahdiElahi opened this issue Feb 4, 2025 · 2 comments
Open

AuthorizeView not work in blazor .net 8 #60189

MahdiElahi opened this issue Feb 4, 2025 · 2 comments
Labels
area-blazor Includes: Blazor, Razor Components Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue.

Comments

@MahdiElahi
Copy link

MahdiElahi commented Feb 4, 2025

i set @attribute [Authorize] for my component
and add this :

 <AuthorizeView>

     <Authorized>

         <div class="d-flex justify-content-between align-items-center mb-4">
             <MudButton Variant="Variant.Filled" Color="Color.Dark" StartIcon="@Icons.Material.Filled.Add" OnClick="AddSlider">
               Add Slider
             </MudButton>
         </div>
     </Authorized>
     <NotAuthorized>
         <p>dont have permission to see</p>
     </NotAuthorized>
 </AuthorizeView>

but when user login and navigate to this url @attribute [Authorize] is woked correctly and show page correctly
but dont show button
why ?

this is my program.cs
https://github.com/MahdiElahi/testtest/blob/main/Program.cs

have any problem ?

@ManickaP ManickaP transferred this issue from dotnet/core Feb 4, 2025
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Feb 4, 2025
@javiercn
Copy link
Member

javiercn commented Feb 4, 2025

@MahdiElahi thanks for contacting us.

We can't access the code you are pointing us to. Please make the repo public and provide a link to it.

@javiercn javiercn added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Feb 4, 2025
Copy link
Contributor

Hi @MahdiElahi. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue.
Projects
None yet
Development

No branches or pull requests

2 participants