mirror of
https://github.com/sudoxnym/audiobookshelf-atv.git
synced 2026-04-14 11:36:27 +00:00
Fix refresh token not persisted on new server connections #1634
This commit is contained in:
parent
bd8668f0bf
commit
7aebcd92c3
1 changed files with 4 additions and 4 deletions
|
|
@ -73,16 +73,16 @@ public class AbsDatabase: CAPPlugin, CAPBridgedPlugin {
|
|||
|
||||
let name = "\(address) (\(username))"
|
||||
|
||||
if id == nil {
|
||||
id = "\(address)@\(username)".toBase64()
|
||||
}
|
||||
|
||||
if (refreshToken != "") {
|
||||
// Store refresh token securely if provided
|
||||
let hasRefreshToken = secureStorage.storeRefreshToken(serverConnectionConfigId: id ?? "", refreshToken: refreshToken)
|
||||
logger.log("Refresh token secured = \(hasRefreshToken)")
|
||||
}
|
||||
|
||||
if id == nil {
|
||||
id = "\(address)@\(username)".toBase64()
|
||||
}
|
||||
|
||||
let config = ServerConnectionConfig()
|
||||
config.id = id ?? ""
|
||||
config.index = 0
|
||||
|
|
|
|||
Loading…
Reference in a new issue