Add Audible region config and user password change modal

Implements configurable Audible region selection in setup and admin settings, affecting all Audible API calls and triggering data refresh on change. Adds a user-facing 'Change Password' modal in the header for local users, moving password change from admin-only to all local users via a new /api/auth/change-password endpoint. Updates documentation, API routes, and context to support these features, and removes the old admin-only password change flow.
This commit is contained in:
kikootwo
2026-01-13 01:51:22 -05:00
parent 50fb5a68af
commit e346f88f42
24 changed files with 932 additions and 317 deletions
+1
View File
@@ -11,6 +11,7 @@ export interface UserInfo {
avatarUrl?: string;
role?: string; // 'admin' | 'user'
isAdmin?: boolean; // Deprecated: use role instead
authProvider?: string; // 'plex' | 'oidc' | 'local'
}
export interface AuthTokens {
@@ -125,6 +125,7 @@ export class LocalAuthProvider implements IAuthProvider {
plexId: user.plexId,
username: user.plexUsername,
role: user.role,
authProvider: 'local',
},
tokens,
};
@@ -223,6 +224,7 @@ export class LocalAuthProvider implements IAuthProvider {
plexId: user.plexId,
username: user.plexUsername,
role: user.role,
authProvider: 'local',
},
tokens,
};
@@ -455,6 +455,7 @@ export class OIDCAuthProvider implements IAuthProvider {
email: user.plexEmail || undefined,
avatarUrl: user.avatarUrl || undefined,
isAdmin: user.role === 'admin',
authProvider: 'oidc',
},
isFirstLogin: isFirstUser && shouldTriggerJobs,
};
@@ -240,6 +240,7 @@ export class PlexAuthProvider implements IAuthProvider {
email: user.plexEmail || undefined,
avatarUrl: user.avatarUrl || undefined,
isAdmin: user.role === 'admin',
authProvider: 'plex',
};
}