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

@@ -42,7 +42,7 @@ public class UserController : ControllerBase
public ActionResult<CreateTokenResponse> GetWebSocketToken()
{
var userId = User.GetShogiUserId();
var displayName = User.DisplayName();
var displayName = User.GetShogiUserDisplayname();
var token = tokenCache.GenerateToken(userId);
return new CreateTokenResponse
@@ -74,7 +74,7 @@ public class UserController : ControllerBase
{
var signOutTask = HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
var userId = User?.GetGuestUserId();
var userId = User?.GetShogiUserId();
if (!string.IsNullOrEmpty(userId))
{
connectionManager.Unsubscribe(userId);