|
@@ -354,8 +354,11 @@ public class IdentityAppService : IIdentityAppService, IScopeDependency
|
|
|
|
|
|
public async Task<Dictionary<string, object>> RefreshTokenAsync(string openId, CancellationToken token)
|
|
|
{
|
|
|
- var thirdAccount = await _thirdAccountRepository.GetByOpenIdAsync(openId, token)
|
|
|
- ?? throw UserFriendlyException.SameMessage("未找到用户信息");
|
|
|
+ var thirdAccount = await _thirdAccountRepository.GetByOpenIdAsync(openId, token);
|
|
|
+ if (thirdAccount is null)
|
|
|
+ {
|
|
|
+ throw new UserFriendlyException(403, "用户不存在");
|
|
|
+ }
|
|
|
|
|
|
return await GetJwtToken(thirdAccount, token);
|
|
|
}
|