feat: refactor refresh token handling; update schema and logic for improved security and functionality

This commit is contained in:
2026-01-23 10:45:49 -05:00
parent 35d891bed7
commit ae91108484
8 changed files with 669 additions and 71 deletions
+6 -1
View File
@@ -10,7 +10,12 @@ namespace SharpbinV3.Server
var random = new Random();
return new string([.. Enumerable.Repeat(chars, length).Select(s => s[random.Next(s.Length)])]);
}
public static string ComputeSha256(string input)
{
var inputBytes = System.Text.Encoding.UTF8.GetBytes(input);
var hashBytes = SHA256.HashData(inputBytes);
return Convert.ToHexString(hashBytes);
}
public static string ComputeHmacSha256(string secret, string input)
{
var secretBytes = System.Text.Encoding.UTF8.GetBytes(secret);