mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-09 23:27:34 +02:00
Implement new JWT auth
This commit is contained in:
@ -112,6 +112,10 @@ class User extends Model {
|
||||
this.updatedAt
|
||||
/** @type {import('./MediaProgress')[]?} - Only included when extended */
|
||||
this.mediaProgresses
|
||||
|
||||
// Temporary accessToken, not stored in database
|
||||
/** @type {string} */
|
||||
this.accessToken
|
||||
}
|
||||
|
||||
// Excludes "root" since their can only be 1 root user
|
||||
@ -520,7 +524,9 @@ class User extends Model {
|
||||
username: this.username,
|
||||
email: this.email,
|
||||
type: this.type,
|
||||
// TODO: Old non-expiring token
|
||||
token: this.type === 'root' && hideRootToken ? '' : this.token,
|
||||
accessToken: this.accessToken || null,
|
||||
mediaProgress: this.mediaProgresses?.map((mp) => mp.getOldMediaProgress()) || [],
|
||||
seriesHideFromContinueListening: [...seriesHideFromContinueListening],
|
||||
bookmarks: this.bookmarks?.map((b) => ({ ...b })) || [],
|
||||
|
Reference in New Issue
Block a user