Update to use x-refresh-token header, update logout to clear refresh token, add AbsLogger logs for android refresh
Some checks are pending
Build APK / main (push) Waiting to run
Verify all i18n files are alphabetized / update_translations (push) Waiting to run

This commit is contained in:
advplyr 2025-07-04 17:41:19 -05:00
parent d8cdb7073e
commit 467fedbfe7
10 changed files with 123 additions and 90 deletions

View file

@ -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))