Reverse statut & Fix Server Salt Time & Clean Code & Update API

This commit is contained in:
2025-09-19 23:14:58 +02:00
parent 6852869313
commit 54e66b2387
3 changed files with 17 additions and 5 deletions

View File

@@ -113,7 +113,8 @@ public class JwtController : Controller
}
var existingIdent = await _redis.GetAsync<string>("UID:" + authResult.Uid);
if (!string.IsNullOrEmpty(existingIdent)) return Unauthorized("Already logged in to this account. Reconnect in 60 seconds. If you keep seeing this issue, restart your game.");
if (!string.IsNullOrEmpty(existingIdent) && !string.Equals(existingIdent, charaIdent, StringComparison.Ordinal))
return Unauthorized("Already logged in to this account. Reconnect in 60 seconds. If you keep seeing this issue, restart your game.");
var token = CreateToken(new List<Claim>()
{
@@ -192,4 +193,4 @@ public class JwtController : Controller
var handler = new JwtSecurityTokenHandler();
return handler.CreateJwtSecurityToken(token);
}
}
}