diff --git a/URL-Shortener/Services/JwtService.cs b/URL-Shortener/Services/JwtService.cs index e7b7f57..aa64d73 100644 --- a/URL-Shortener/Services/JwtService.cs +++ b/URL-Shortener/Services/JwtService.cs @@ -14,9 +14,9 @@ namespace URL_Shortener.Services public string GenerateToken(User user) { var claims = new List() { - new("userName", user.Name), - new("userEmail", user.Email), - new("id", user.Id.ToString()) + new(ClaimTypes.Name, user.Name), + new(ClaimTypes.Email, user.Email), + new(ClaimTypes.NameIdentifier, user.Id.ToString()) }; var jwt = new JwtSecurityToken( expires: DateTime.UtcNow.Add(options.Value.Expires),