Skip to content

Commit

Permalink
Login with proxy, timezone and locale
Browse files Browse the repository at this point in the history
  • Loading branch information
Stiveknx authored Nov 25, 2021
1 parent b308cac commit 06feaea
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 06feaea

Please sign in to comment.