mirror of
https://github.com/oskvr37/tiddl.git
synced 2026-06-13 12:15:13 +03:00
✨ add user auth data to config
This commit is contained in:
@@ -50,6 +50,8 @@ def login(ctx: Context):
|
||||
"token": token["access_token"],
|
||||
"refresh_token": token["refresh_token"],
|
||||
"expires": token["expires_in"] + int(time()),
|
||||
"user_id": str(token["user"]["userId"]),
|
||||
"country_code": token["user"]["countryCode"],
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
+3
-1
@@ -21,6 +21,8 @@ class AuthConfig(TypedDict, total=False):
|
||||
token: str
|
||||
refresh_token: str
|
||||
expires: int
|
||||
user_id: str
|
||||
country_code: str
|
||||
|
||||
|
||||
class ConfigFile(TypedDict):
|
||||
@@ -35,7 +37,7 @@ class ConfigUpdate(TypedDict, total=False):
|
||||
|
||||
DEFAULT_CONFIG: ConfigFile = {
|
||||
"download": {"quality": DEFAULT_QUALITY, "path": str(DOWNLOAD_PATH)},
|
||||
"auth": {"token": "", "refresh_token": "", "expires": 0},
|
||||
"auth": {"token": "", "refresh_token": "", "expires": 0, "country_code": "", "user_id": ""},
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user