mirror of
https://github.com/dnslin/aria2bot.git
synced 2026-01-11 04:02:20 +08:00
fix: 修正从缓存读取token
This commit is contained in:
@@ -83,6 +83,10 @@ class OneDriveClient(CloudStorageBase):
|
|||||||
def _get_account(self) -> Account:
|
def _get_account(self) -> Account:
|
||||||
"""获取或创建 Account 实例"""
|
"""获取或创建 Account 实例"""
|
||||||
if self._account is None:
|
if self._account is None:
|
||||||
|
# 确保 token 已从文件加载到缓存
|
||||||
|
if not self._token_backend.has_data:
|
||||||
|
self._token_backend.load_token()
|
||||||
|
|
||||||
# 公共客户端只需要 client_id,不需要 client_secret
|
# 公共客户端只需要 client_id,不需要 client_secret
|
||||||
credentials = (self.config.client_id,)
|
credentials = (self.config.client_id,)
|
||||||
self._account = Account(
|
self._account = Account(
|
||||||
|
|||||||
Reference in New Issue
Block a user