Allow reuathentication for jellyfin (#214)
This commit is contained in:
parent
7ddba8ede7
commit
b60ba27892
2 changed files with 7 additions and 1 deletions
|
@ -272,6 +272,12 @@ axiosClient.interceptors.response.use(
|
||||||
if (error.response && error.response.status === 401) {
|
if (error.response && error.response.status === 401) {
|
||||||
const currentServer = useAuthStore.getState().currentServer;
|
const currentServer = useAuthStore.getState().currentServer;
|
||||||
|
|
||||||
|
if (currentServer) {
|
||||||
|
useAuthStore
|
||||||
|
.getState()
|
||||||
|
.actions.updateServer(currentServer.id, { credential: undefined });
|
||||||
|
}
|
||||||
|
|
||||||
authenticationFailure(currentServer);
|
authenticationFailure(currentServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ export const AppMenu = () => {
|
||||||
const server = serverList[serverId];
|
const server = serverList[serverId];
|
||||||
const isNavidromeExpired =
|
const isNavidromeExpired =
|
||||||
server.type === ServerType.NAVIDROME && !server.ndCredential;
|
server.type === ServerType.NAVIDROME && !server.ndCredential;
|
||||||
const isJellyfinExpired = false;
|
const isJellyfinExpired = server.type === ServerType.JELLYFIN && !server.credential;
|
||||||
const isSessionExpired = isNavidromeExpired || isJellyfinExpired;
|
const isSessionExpired = isNavidromeExpired || isJellyfinExpired;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Reference in a new issue