Skip to content

Commit

Permalink
Resume sessions without old session
Browse files Browse the repository at this point in the history
  • Loading branch information
Stiveknx authored Mar 2, 2022
1 parent c7643f1 commit 9bad3be
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions routers/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,20 @@ async def auth_relogin(sessionid: str = Form(...),
return result

@router.post("/challenge_code")
async def challenge_choice(sessionid: str = Form(...),
async def challenge_code(sessionid: str = Form(...),
code: str = Form(...),
clients: ClientStorage = Depends(get_clients)) -> str:
""" Challenge code
"""
cl = clients.get(sessionid)

## Aqui você puxa os headers, os cookies e o challenge_url que você salvou na linha 14 e chama o checkpoint_resume
result = cl.resume_checkpoint(code, challenge_url, old_session)
old_session = ""
challenge_url = ""
if(old_session)
result = cl.resume_checkpoint(code, challenge_url, old_session)
else
result = cl.send_checkpoint_code(code, challenge_url)
return result


Expand Down

0 comments on commit 9bad3be

Please sign in to comment.