u
This commit is contained in:
@@ -13,24 +13,23 @@ public partial class App
|
||||
|
||||
private async Task HandleNavigationAsync(NavigationContext context)
|
||||
{
|
||||
// Temporarily bypass authentication to test profile page
|
||||
// var normalizedPath = NormalizePath(context.Path);
|
||||
// if (IsAuthPath(normalizedPath))
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
var normalizedPath = NormalizePath(context.Path);
|
||||
if (IsAuthPath(normalizedPath))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// var token = await LocalStorage.GetItemAsync<string>(TokenStorageKey);
|
||||
// if (!string.IsNullOrWhiteSpace(token))
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
var token = await LocalStorage.GetItemAsync<string>(TokenStorageKey);
|
||||
if (!string.IsNullOrWhiteSpace(token))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// var redirect = string.IsNullOrEmpty(normalizedPath) || normalizedPath == "/"
|
||||
// ? string.Empty
|
||||
// : $"?redirect={Uri.EscapeDataString(normalizedPath)}";
|
||||
var redirect = string.IsNullOrEmpty(normalizedPath) || normalizedPath == "/"
|
||||
? string.Empty
|
||||
: $"?redirect={Uri.EscapeDataString(normalizedPath)}";
|
||||
|
||||
// Navigation.NavigateTo(RouteConstants.Auth.Phone + redirect, forceLoad: true);
|
||||
Navigation.NavigateTo(RouteConstants.Auth.Phone + redirect, forceLoad: true);
|
||||
}
|
||||
|
||||
private static bool IsAuthPath(string? path)
|
||||
|
||||
Reference in New Issue
Block a user