Fix Api Key authentication

This commit is contained in:
Patrick Barron 2021-06-27 16:44:34 -04:00
parent bbac9ff67e
commit fdba71e133

View File

@ -171,15 +171,7 @@ namespace Jellyfin.Server.Implementations.Security
updateToken = true;
}
if (!device.UserId.Equals(Guid.Empty))
{
authInfo.User = _userManager.GetUserById(device.UserId);
authInfo.IsApiKey = false;
}
else
{
authInfo.IsApiKey = true;
}
authInfo.User = _userManager.GetUserById(device.UserId);
if (updateToken)
{
@ -198,6 +190,7 @@ namespace Jellyfin.Server.Implementations.Security
authInfo.DeviceId = string.Empty;
authInfo.Device = string.Empty;
authInfo.Version = string.Empty;
authInfo.IsApiKey = true;
}
}