in the middle of relearning msal

This commit is contained in:
2022-11-17 16:18:15 -06:00
parent 716470f24d
commit e3cf2f1059
14 changed files with 324 additions and 298 deletions

View File

@@ -1,24 +1,23 @@
using Shogi.UI.Shared;
namespace Shogi.UI.Pages.Home.Account
namespace Shogi.UI.Pages.Home.Account;
public static class LocalStorageExtensions
{
public static class LocalStorageExtensions
private const string AccountPlatform = "AccountPlatform";
public static Task<WhichAccountPlatform?> GetAccountPlatform(this ILocalStorage self)
{
private const string AccountPlatform = "AccountPlatform";
return self.Get<WhichAccountPlatform>(AccountPlatform).AsTask();
}
public static Task<WhichAccountPlatform?> GetAccountPlatform(this ILocalStorage self)
{
return self.Get<WhichAccountPlatform>(AccountPlatform).AsTask();
}
public static Task SetAccountPlatform(this ILocalStorage self, WhichAccountPlatform platform)
{
return self.Set(AccountPlatform, platform.ToString()).AsTask();
}
public static Task SetAccountPlatform(this ILocalStorage self, WhichAccountPlatform platform)
{
return self.Set(AccountPlatform, platform.ToString()).AsTask();
}
public static Task DeleteAccountPlatform(this ILocalStorage self)
{
return self.Delete(AccountPlatform).AsTask();
}
public static Task DeleteAccountPlatform(this ILocalStorage self)
{
return self.Delete(AccountPlatform).AsTask();
}
}