mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #2575 from jellyfin/revert-2536-fix-invalid-credentials
Revert "fix: redirect to login if stored credentials are invalid"
(cherry picked from commit 70ac9e0f2b
)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
32d152150b
commit
ff0a46a004
1 changed files with 1 additions and 5 deletions
|
@ -425,11 +425,7 @@ class AppRouter {
|
||||||
onRequestFail(e, data) {
|
onRequestFail(e, data) {
|
||||||
const apiClient = this;
|
const apiClient = this;
|
||||||
|
|
||||||
// 401 means the credentials are broken
|
if (data.status === 403) {
|
||||||
if (data.status === 401) {
|
|
||||||
console.debug('Invalid stored credentials, redirecting to login');
|
|
||||||
appRouter.showLocalLogin(apiClient.serverId());
|
|
||||||
} else if (data.status === 403) {
|
|
||||||
if (data.errorCode === 'ParentalControl') {
|
if (data.errorCode === 'ParentalControl') {
|
||||||
const isCurrentAllowed = appRouter.currentRouteInfo ? (appRouter.currentRouteInfo.route.anonymous || appRouter.currentRouteInfo.route.startup) : true;
|
const isCurrentAllowed = appRouter.currentRouteInfo ? (appRouter.currentRouteInfo.route.anonymous || appRouter.currentRouteInfo.route.startup) : true;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue