Skip to content

Commit

Permalink
Fix QR code login invalid cookies error
Browse files Browse the repository at this point in the history
  • Loading branch information
seriaati committed Apr 20, 2024
1 parent 65e160c commit 6c5b7b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions genshin/client/components/auth/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,10 @@ async def login_with_qrcode(self) -> QRLoginResult:
stoken = await fetch_stoken_with_game_token(game_token=raw_data.game_token, account_id=int(raw_data.account_id))

cookies = {
"stoken": stoken.token,
"stuid": stoken.aid,
"mid": stoken.mid,
"stoken_v2": stoken.token,
"ltuid": stoken.aid,
"account_id": stoken.aid,
"ltmid": stoken.mid,
"cookie_token": cookie_token,
}
self.set_cookies(cookies)
Expand Down
7 changes: 4 additions & 3 deletions genshin/models/auth/cookie.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ class QRLoginResult(CookieLoginResult):
Returned by `client.login_with_qrcode`.
"""

stoken: str
stuid: str
mid: str
stoken_v2: str
account_id: str
ltuid: str
ltmid: str
cookie_token: str


Expand Down

0 comments on commit 6c5b7b9

Please sign in to comment.