From 0116bafbe82c86aa60f15710538a3311aff21fb5 Mon Sep 17 00:00:00 2001 From: geffzhang Date: Fri, 2 Feb 2024 18:49:04 +0800 Subject: [PATCH] fix : GenerateJwtToken not null user.ExternalId is null should be string,Empty --- src/Infrastructure/BotSharp.Core/Users/Services/UserService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Infrastructure/BotSharp.Core/Users/Services/UserService.cs b/src/Infrastructure/BotSharp.Core/Users/Services/UserService.cs index d0060671..0ff544ca 100644 --- a/src/Infrastructure/BotSharp.Core/Users/Services/UserService.cs +++ b/src/Infrastructure/BotSharp.Core/Users/Services/UserService.cs @@ -139,7 +139,7 @@ public class UserService : IUserService new Claim(JwtRegisteredClaimNames.GivenName, user.FirstName), new Claim(JwtRegisteredClaimNames.FamilyName, user.LastName), new Claim("source", user.Source), - new Claim("external_id", user.ExternalId), + new Claim("external_id", user.ExternalId??string.Empty), new Claim(JwtRegisteredClaimNames.Jti, Guid.NewGuid().ToString()) };