🐛 Fix PCKE state broke the callback

This commit is contained in:
2025-06-17 21:30:58 +08:00
parent 5e455599fd
commit 3aad515ab8
3 changed files with 22 additions and 22 deletions

View File

@ -175,8 +175,7 @@ public class GoogleOidcService(
public string GenerateCodeChallenge(string codeVerifier)
{
using var sha256 = System.Security.Cryptography.SHA256.Create();
var challengeBytes = sha256.ComputeHash(Encoding.UTF8.GetBytes(codeVerifier));
var challengeBytes = SHA256.HashData(Encoding.UTF8.GetBytes(codeVerifier));
return Convert.ToBase64String(challengeBytes)
.Replace('+', '-')
.Replace('/', '_')