diff --git a/App.xaml.cs b/App.xaml.cs
index 451ac1a..d01dad5 100644
--- a/App.xaml.cs
+++ b/App.xaml.cs
@@ -3,7 +3,7 @@
public App() {
InitializeComponent();
- MainPage = new MainPage();
+ MainPage = new AppShell();
}
}
}
diff --git a/AppShell.xaml b/AppShell.xaml
new file mode 100644
index 0000000..e50bd25
--- /dev/null
+++ b/AppShell.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/AppShell.xaml.cs b/AppShell.xaml.cs
new file mode 100644
index 0000000..c07ae1e
--- /dev/null
+++ b/AppShell.xaml.cs
@@ -0,0 +1,11 @@
+namespace Neighbourhood.omg.lol;
+
+public partial class AppShell : Shell
+{
+ public AppShell()
+ {
+ InitializeComponent();
+
+ Routing.RegisterRoute(nameof(LoginWebViewPage), typeof(LoginWebViewPage));
+ }
+}
\ No newline at end of file
diff --git a/Components/Layout/NavMenu.razor b/Components/Layout/NavMenu.razor
index 6d51817..d64fb0c 100644
--- a/Components/Layout/NavMenu.razor
+++ b/Components/Layout/NavMenu.razor
@@ -1,18 +1,39 @@
-
+
+@code {
+ private string? Name = null;
+ private List Addresses = new List();
+ private string FirstAddress { get => this.Addresses.FirstOrDefault() ?? string.Empty; }
+
+ protected override async Task OnInitializedAsync() {
+ var state = await AuthStateProvider.GetAuthenticationStateAsync();
+ var identity = state.User.Identity;
+
+ Name = identity?.Name ?? string.Empty;
+ Addresses = state.User.FindFirst("addresses")?.Value?.Split(',')?.ToList() ?? new List();
+ }
+
+}
\ No newline at end of file
diff --git a/Components/Pages/Home.razor b/Components/Pages/Home.razor
index 5850dee..70a1ef0 100644
--- a/Components/Pages/Home.razor
+++ b/Components/Pages/Home.razor
@@ -1,5 +1,7 @@
@page "/"
+@inject CustomAuthenticationStateProvider AuthStateProvider;
-
Hello, lol!
+
Hello, lol!
+ AuthStateProvider.Logout()'>Logout
Welcome to your new app.
\ No newline at end of file
diff --git a/Components/Pages/Login.razor b/Components/Pages/Login.razor
new file mode 100644
index 0000000..8cfe9b6
--- /dev/null
+++ b/Components/Pages/Login.razor
@@ -0,0 +1,29 @@
+@page "/login"
+@using Microsoft.AspNetCore.Components.Authorization
+@using System.Security.Claims
+@inject NavigationManager navigationManager
+@inject AuthenticationStateProvider AuthStateProvider
+