Force re-login if using old token, show alert if admin user, add isOldToken flag to user

This commit is contained in:
advplyr
2025-07-05 17:46:18 -05:00
parent 8dbe1e4e5d
commit e59babdf24
3 changed files with 44 additions and 3 deletions

View File

@ -522,6 +522,9 @@ class User extends Model {
type: this.type,
// TODO: Old non-expiring token
token: this.type === 'root' && hideRootToken ? '' : this.token,
// TODO: Temporary flag not saved in db that is set in Auth.js jwtAuthCheck
// Necessary to detect apps using old tokens that no longer match the old token stored on the user
isOldToken: this.isOldToken,
mediaProgress: this.mediaProgresses?.map((mp) => mp.getOldMediaProgress()) || [],
seriesHideFromContinueListening: [...seriesHideFromContinueListening],
bookmarks: this.bookmarks?.map((b) => ({ ...b })) || [],