https://github.com/icehub82/icenet.shared
Solution containing Maui hybrid and Blazor Server apps with a Razor library containing shared Layouts, Pages and Components for reuse of code across applications.
https://github.com/icehub82/icenet.shared
blazor-server csharp dotnet8 maui-blazor razor-component shared-component
Last synced: 9 months ago
JSON representation
Solution containing Maui hybrid and Blazor Server apps with a Razor library containing shared Layouts, Pages and Components for reuse of code across applications.
- Host: GitHub
- URL: https://github.com/icehub82/icenet.shared
- Owner: iceHub82
- Created: 2024-02-09T10:56:08.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-19T15:29:09.000Z (almost 2 years ago)
- Last Synced: 2025-03-29T07:45:08.219Z (10 months ago)
- Topics: blazor-server, csharp, dotnet8, maui-blazor, razor-component, shared-component
- Language: HTML
- Homepage:
- Size: 239 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
IceNet.Shared
The solution contains Maui hybrid and Blazor Server apps, each equipped with user authorization functionalities. Additionally, it includes a shared Razor component library that encompasses layouts, pages, and components.
Description
The aim of this solution is to maximize code reuse across both applications by utilizing layouts, pages, and components. Efforts have been made to keep the Maui Blazor app and the Blazor Server app as "thin" as possible by consolidating shared code in the Razor component library. Since Maui Blazor operates on both Desktop and Mobile platforms, while Blazor Server operates within a browser, there were challenges in implementing a shared login page that could authenticate users from either Desktop/Mobile or a Web Browser. To address this, the AuthenticationStateProvider is utilized for authorizing users in Maui (Desktop and Mobile), while web users are authenticated with cookies. Additionally, to persist user authorization in Desktop/Mobile, user information has been stored in the Preference storage on the devices.
Getting started
Log in with the following hardcoded email: "test@test.com" and any password. Note, only user authorization has been added and not user authentication.
Features
- User authorization (Login/Logout)
- Show user email
- Toggle Darkmode