File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,22 @@ async def login_initiate(client: AsyncClient) -> Response:
47
47
return rep
48
48
49
49
50
+ async def login_alternate_identifier (ctx : TaskCtx , * , username : str ) -> Response :
51
+ payload = {
52
+ "flow_token" : ctx .prev ["flow_token" ],
53
+ "subtask_inputs" : [
54
+ {
55
+ "subtask_id" : "LoginEnterAlternateIdentifierSubtask" ,
56
+ "enter_text" : {"text" : username , "link" : "next_link" },
57
+ }
58
+ ],
59
+ }
60
+
61
+ rep = await ctx .client .post (LOGIN_URL , json = payload )
62
+ raise_for_status (rep , "login_alternate_identifier" )
63
+ return rep
64
+
65
+
50
66
async def login_instrumentation (ctx : TaskCtx ) -> Response :
51
67
payload = {
52
68
"flow_token" : ctx .prev ["flow_token" ],
@@ -200,6 +216,8 @@ async def next_login_task(ctx: TaskCtx, rep: Response):
200
216
return await login_enter_username (ctx )
201
217
if task_id == "LoginJsInstrumentationSubtask" :
202
218
return await login_instrumentation (ctx )
219
+ if task_id == "LoginEnterAlternateIdentifierSubtask" :
220
+ return await login_alternate_identifier (ctx , username = ctx .acc .username )
203
221
except Exception as e :
204
222
ctx .acc .error_msg = f"login_step={ task_id } err={ e } "
205
223
raise e
You can’t perform that action at this time.
0 commit comments