mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-13 19:04:57 +02:00
Implement new JWT auth
This commit is contained in:
parent
e384863148
commit
4f5123e842
21 changed files with 739 additions and 56 deletions
|
@ -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 })) || [],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue