Fix claims.

Use OID instead of email for microsoft identifier.
Fix PlayerCount route.
Add created date to user table.
Create spectator icon.
This commit is contained in:
2023-01-20 20:48:38 -06:00
parent 1d0beaf69f
commit 26fd955aa4
35 changed files with 672 additions and 1426 deletions

View File

@@ -57,10 +57,12 @@ namespace Shogi.UI.Pages.Home.Api
return null;
}
public async Task<CreateTokenResponse?> GetToken()
public async Task<CreateTokenResponse?> GetToken(WhichAccountPlatform whichAccountPlatform)
{
Console.WriteLine($"GetToken() - {accountState.User?.WhichAccountPlatform}");
var response = await HttpClient.GetFromJsonAsync<CreateTokenResponse>(new Uri("User/Token", UriKind.Relative), serializerOptions);
var httpClient = whichAccountPlatform == WhichAccountPlatform.Microsoft
? clientFactory.CreateClient(MsalClientName)
: clientFactory.CreateClient(GuestClientName);
var response = await httpClient.GetFromJsonAsync<CreateTokenResponse>(new Uri("User/Token", UriKind.Relative), serializerOptions);
return response;
}