Neighbourhood.omg.lol/MainPage.xaml.cs
Gordon Pedersen 5fb95c8305 Added auth.
Unfortunately it does not refresh at first login. Have to figure out how to make it refresh
2024-05-31 23:16:09 +10:00

17 lines
520 B
C#

using Microsoft.AspNetCore.Components.WebView;
using System.Diagnostics;
namespace Neighbourhood.omg.lol {
public partial class MainPage : ContentPage {
public MainPage() {
InitializeComponent();
}
private void BlazorUrlLoading(object? sender, UrlLoadingEventArgs e) {
if(e.Url.Host == "home.omg.lol" && e.Url.AbsolutePath == "/oauth/authorize") {
e.UrlLoadingStrategy = UrlLoadingStrategy.CancelLoad;
Shell.Current.GoToAsync(nameof(LoginWebViewPage));
}
}
}
}