Skip to content

Commit

Permalink
Merge branch 'main' into demo-bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
vanbukin authored Mar 23, 2024
2 parents a9d024c + cb6a939 commit 7f26ab1
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Text.Json;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.WebUtilities;
Expand Down Expand Up @@ -106,7 +108,7 @@ private void Write(HttpContext httpContext, TypedInternalApplicationUser[] items

private static TypedInternalApplicationUser Create(string userName)
{
var userHandle = Guid.NewGuid().ToByteArray();
var userHandle = SHA256.HashData(Encoding.UTF8.GetBytes(userName));
var createdAt = DateTimeOffset.FromUnixTimeSeconds(DateTimeOffset.UtcNow.ToUnixTimeSeconds());
return new(userHandle, userName, createdAt);
}
Expand Down

0 comments on commit 7f26ab1

Please sign in to comment.