Repository navigation
feat: Identity app support (auth blocks, sidebar account menu, static /Account pages) - #40
Merged
Merged
Conversation
added 4 commits
October 3, 2026 15:50
…ity apps Adding a dashboard to an app that uses ASP.NET Core Identity also installs the hidden sidebar-account component and swaps AppSidebar's placeholder user footer for it. Signed out it shows Log in and Register; signed in, the user (linking to Account/Manage) and Log out. A customized footer is left alone.
init set <Routes> to InteractiveServer for every page, but the Identity pages are excluded from interactive routing because they set sign-in cookies, so every /Account page returned Not Found. In Identity apps, init now uses a PageRenderMode that renders /Account statically and everything else with InteractiveServer, the same approach as the .NET 8 template.
Three layout blocks for the sign-in, sign-up and account recovery pages: a centered card, a split screen and a minimal form. Adding one sets @layout in Components/Account/Pages/_Imports.razor (the Manage pages keep the app layout) and restyles the Identity pages that are unchanged from dotnet new blazor on .NET 8, 9 and 10, mapping Bootstrap classes to ShellUI's button, input and alert styles. Edited pages are listed, not changed. init no longer flags these pages as needing a restyle; it points to the blocks instead.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Makes ShellUI work with Blazor apps created with
--auth Individual.init.initset<Routes>toInteractiveServerfor every page, but the Identity pages are excluded from interactive routing because they set sign-in cookies. In Identity apps,initnow uses aPageRenderModethat renders/Accountstatically and everything else withInteractiveServer(the .NET 8 template's approach; compiles on .NET 8, 9 and 10).sidebar-accountcomponent and swaps AppSidebar's placeholder user footer for it: Log in and Register when signed out, the user (linking toAccount/Manage) and Log out when signed in. A customized footer is left alone.shellui add auth-01(centered card),auth-02(split screen with a brand panel),auth-03(minimal form). Adding one:@layoutinComponents/Account/Pages/_Imports.razor, so sign-in, sign-up and recovery pages render without the dashboard sidebar; the Manage pages keep the app layout. Adding another auth block switches to it.dotnet new blazor(checked against all 41 stock files for .NET 8, 9 and 10 across every interactivity option, any project name), mapping Bootstrap classes to ShellUI's button, input and alert styles. Edited pages are listed, not changed. Columns use container queries, so they stack inside a narrow card and on phones.initno longer restyles or flags the Identity pages; it prints a hint naming the auth blocks.//comments shortened to single lines.Tests and CI
AccountPagesTestsandAuthSetupTests, plus cases for the static render mode, the footer swap and Identity detection.--auth Individualapp, runsinit --dashboard 02andadd auth-01, checks the wiring and builds it.Verification
dotnet build0 warnings, 298 tests pass.my-app), with no Bootstrap classes left.