feat(component and api): adding emby connect authentication with local account linking

Updated authentication flow to handle local account linking

#943
This commit is contained in:
Hermanus Engelbrecht
2025-02-22 20:39:28 +01:00
parent 4c9b5484a8
commit 7973ad0ecd
3 changed files with 18 additions and 11 deletions

View File

@@ -122,7 +122,7 @@ class JellyfinAPI extends ExternalAPI {
},
}
);
this.deviceId = deviceId;
this.deviceId = deviceId ? deviceId : undefined;
}
public async login(
@@ -187,6 +187,15 @@ class JellyfinAPI extends ExternalAPI {
if (e.cause.status === 401) {
throw new ApiError(e.cause.status, ApiErrorCode.InvalidCredentials);
}
logger.error(
'Something went wrong while authenticating with the Jellyfin server',
{
label: 'Jellyfin API',
error: e.cause.message ?? e.cause.statusText,
ip: ClientIP,
}
);
}
try {