Commit 5aeb2f1
Add .NET 10 MauiBlazorWebIdentity sample (#647)
* Add .NET 10 MauiBlazorWebIdentity sample
Copied 9.0/MauiBlazorWebIdentity and upgraded to .NET 10 with:
- All TFMs and packages updated to net10.0/10.0.2
- Identity Schema v3 with passkey support (PasskeySubmit, Passkeys, RenamePasskey)
- NotFound page with UseStatusCodePagesWithReExecute
- ReconnectModal component
- All identity pages updated from official .NET 10 template
- Cross-platform DB: SQL Server on Windows, SQLite on macOS/Linux
- Bootstrap updated to lib/bootstrap/dist/ (full dist from template)
- App.razor: ResourcePreloader, ImportMap, @assets refs
- Removed IdentityUserAccessor (replaced by RedirectToInvalidUser)
- Removed Tizen platform target
- Preserved all MAUI client auth behavior unchanged
* Rename projects: MauiBlazorWeb → MauiBlazorWebIdentity
- Solution: MauiBlazorWebIdentity.sln (was MauiBlazorWeb.sln)
- Shared: MauiBlazorWebIdentity.Shared (was MauiBlazorWeb.Shared)
- Web: MauiBlazorWebIdentity.Web (was MauiBlazorWeb.Web)
- MAUI: MauiBlazorWebIdentity (was MauiBlazorWeb)
- Removed unnecessary nested MauiBlazorWeb/ subfolder
- All namespaces updated to match
- Differentiates from the non-identity 9.0/MauiBlazorWeb sample
* Fix MAUI build: restore AddMauiBlazorWebView API name, update package versions
- AddMauiBlazorWebView() was incorrectly renamed during global namespace replace
- MAUI packages updated to 10.0.10 (actual available version)
- Microsoft.Extensions.Logging.Debug set to 10.0.0
* Fix nav and CSS to match .NET 10 template
- Add missing 'nav' CSS class to <nav> element in both Web and MAUI NavMenu.razor
- Update MAUI MainLayout.razor.css: add 'color-scheme: light only;'
- Update MAUI NavMenu.razor.css: height -> min-height
* Simplify to SQLite only
Remove conditional SQL Server/SQLite logic — this is a sample app,
no need for cross-platform DB complexity. SQLite works everywhere.
* Fix 401 on logout: use DefaultChallengeScheme pattern from 9.0
AddIdentityApiEndpoints sets DefaultScheme to BearerAndApplicationScheme
(composite scheme for both bearer tokens and cookies). Setting DefaultScheme
to ApplicationScheme overrides this and breaks API auth for MAUI clients.
Instead, only override DefaultChallengeScheme to ApplicationScheme (cookie),
which redirects to /Account/Login on auth challenge while preserving the
composite scheme for authentication. This matches the documented pattern
from MS Learn for MAUI Blazor Hybrid + Identity apps.
* Fix NotFound page to use MainLayout for both Web and MAUI
- Move NotFound.razor from Shared to Web project with @layout MainLayout
so UseStatusCodePagesWithReExecute renders it with the sidebar/nav
- Create MAUI-specific NotFound.razor with @layout MainLayout since
Router's NotFoundPage renders outside <Found> (no DefaultLayout)
- Update both Routes.razor to reference their local NotFound pages
- Remove Shared NotFound.razor to avoid ambiguous route matching
* Fix MAUI login styling, SecureStorage entitlements, and Remember Me
- Style MAUI Login.razor to match web login (form-floating, btn-lg)
- Add Remember Me checkbox with conditional token persistence
- Add keychain-access-groups entitlement for Mac Catalyst SecureStorage
- Extract TokenStorage.DeserializeToken for memory-only token path
* Fix edge-to-edge safe area handling for Android and iOS
Make safe area CSS rules universal instead of iOS-only (@supports
-webkit-touch-callout). This enables proper safe area handling on
Android 15+ (API 35+) which enforces edge-to-edge rendering, causing
the app content to render behind the status bar.
Changes:
- Remove @supports (-webkit-touch-callout: none) wrapper so safe area
rules apply to both Android and iOS
- Change status bar background from #f7f7f7 to rgb(3, 23, 62) to match
the sidebar navbar color (gradient start rgb(5,39,103) composited with
the top-row overlay rgba(0,0,0,0.4))
- Apply env(safe-area-inset-left) universally for landscape orientation
sidebar padding on both platforms
See: dotnet/maui#34462
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 6dfab40 commit 5aeb2f1
176 files changed
Lines changed: 67007 additions & 0 deletions
File tree
- 10.0/MauiBlazorWebIdentity
- MauiBlazorWebIdentity.Web
- Components
- Account
- Pages
- Manage
- Layout
- Pages
- Data
- Migrations
- Properties
- Services
- MauiBlazorWebIdentity
- Components
- Layout
- Pages
- Models
- Platforms
- Android
- Resources/values
- MacCatalyst
- Windows
- iOS
- Properties
- Resources
- AppIcon
- Fonts
- Images
- Raw
- Splash
- Services
- wwwroot
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
0 commit comments