-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fix BlazorServer Identity templates #25456
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
.../content/BlazorServerWeb-CSharp/Areas/Identity/Pages/Shared/_LoginPartial.Identity.cshtml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| @using Microsoft.AspNetCore.Identity | ||
| @inject SignInManager<IdentityUser> SignInManager | ||
| @inject UserManager<IdentityUser> UserManager | ||
| @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers | ||
|
|
||
| <ul class="navbar-nav"> | ||
| @if (SignInManager.IsSignedIn(User)) | ||
| { | ||
| <li class="nav-item"> | ||
| <a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Hello @User.Identity.Name!</a> | ||
| </li> | ||
| <li class="nav-item"> | ||
| <form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="/" method="post"> | ||
| <button type="submit" class="nav-link btn btn-link text-dark">Logout</button> | ||
| </form> | ||
| </li> | ||
| } | ||
| else | ||
| { | ||
| <li class="nav-item"> | ||
| <a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Register">Register</a> | ||
| </li> | ||
| <li class="nav-item"> | ||
| <a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Login">Login</a> | ||
| </li> | ||
| } | ||
| </ul> |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this added in the first place? FYI, I discussed this a little more in #25456 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Virtualization isn't wasm specific, it's part of the core component experience: https://github.com/dotnet/aspnetcore/blob/master/src/Components/Web/src/Virtualization/Virtualize.cs#L12-L18.
It's weird that you're seeing the error. Perhaps you are using an an old targeting pack?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I believe the template is fine here and this is some environment-related issue. I see this PR is already merged but we should consider bringing it back in another PR. Perhaps @MackinnonBuck can resolve this in his virtualization improvements PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm making a followup PR to this one to rc2 so I'll do it there. Can one of you help me figure out why I was running into the error during verification?