mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-30 06:39:35 +02:00
Update to use x-refresh-token header, update logout to clear refresh token, add AbsLogger logs for android refresh
This commit is contained in:
parent
d8cdb7073e
commit
467fedbfe7
10 changed files with 123 additions and 90 deletions
|
@ -69,6 +69,11 @@ class AbsDatabaseWeb extends WebPlugin {
|
|||
return refreshToken ? { refreshToken } : null
|
||||
}
|
||||
|
||||
async clearRefreshToken({ serverConnectionConfigId }) {
|
||||
console.log('[AbsDatabase] Clearing refresh token...', serverConnectionConfigId)
|
||||
localStorage.removeItem(`refresh_token_${serverConnectionConfigId}`)
|
||||
}
|
||||
|
||||
async removeServerConnectionConfig(serverConnectionConfigCallObject) {
|
||||
var serverConnectionConfigId = serverConnectionConfigCallObject.serverConnectionConfigId
|
||||
var deviceData = await this.getDeviceData()
|
||||
|
@ -77,6 +82,7 @@ class AbsDatabaseWeb extends WebPlugin {
|
|||
}
|
||||
|
||||
async logout() {
|
||||
console.log('[AbsDatabase] Logging out...')
|
||||
var deviceData = await this.getDeviceData()
|
||||
deviceData.lastServerConnectionConfigId = null
|
||||
localStorage.setItem('device', JSON.stringify(deviceData))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue