Skip to content

Commit

Permalink
Merge pull request subzeroid#1 from Stiveknx/Stiveknx-patch-login_pro…
Browse files Browse the repository at this point in the history
…xy_timezone_locale

Login with proxy, timezone and locale
  • Loading branch information
Stiveknx authored Nov 25, 2021
2 parents b308cac + 06feaea commit fa59fca
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions routers/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,21 @@
async def auth_login(username: str = Form(...),
password: str = Form(...),
verification_code: Optional[str] = Form(""),
proxy: Optional[str] = Form(""),
locale: Optional[str] = Form(""),
timezone: Optional[str] = Form(""),
clients: ClientStorage = Depends(get_clients)) -> str:
"""Login by username and password with 2FA
"""
cl = clients.client()
if proxy != "":
cl.set_proxy(proxy)

if locale != "":
cl.set_locale(locale)

if timezone != "":
cl.set_timezone_offset(timezone)

result = cl.login(
username,
Expand Down

0 comments on commit fa59fca

Please sign in to comment.