fix: use url-unsafe base 64 for auth tokens
.net throws an error when decoding url-safe base 64 luckily we never decode it *except* for tokens, so those can keep using url-unsafe base 64. they're never used in URLs after all
This commit is contained in:
parent
9d33093339
commit
49b2902d6d
2 changed files with 5 additions and 4 deletions
|
@ -358,7 +358,7 @@ public class AuthService(
|
|||
|
||||
private static (string, byte[]) GenerateToken()
|
||||
{
|
||||
string token = AuthUtils.RandomToken();
|
||||
string token = AuthUtils.RandomUrlUnsafeToken();
|
||||
byte[] hash = SHA512.HashData(Convert.FromBase64String(token));
|
||||
|
||||
return (token, hash);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue