From c2935342d40849488ce91cabe894e90f63311721 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Sat, 12 Oct 2024 22:43:25 +1100 Subject: Fix LoginEnterAlternateIdentifierSubtask failure --- exitter.el | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'exitter.el') diff --git a/exitter.el b/exitter.el index 836756e..3a06490 100644 --- a/exitter.el +++ b/exitter.el @@ -167,14 +167,16 @@ :parser 'json-read :success (cl-function (lambda (&key data &allow-other-keys) - (cond - ((exitter-find-subtask data "LoginEnterPassword") - (message "LoginEnterPassword") - (exitter-enter-password flow-token headers)) - ((exitter-find-subtask data "LoginEnterAlternateIdentifierSubtask") - (message "LoginEnterAlternateIdentifierSubtask") - (exitter-enter-email flow-token headers)) - (t (message "Cannot find any matching subtasks"))) + (let ((new-flow-token + (alist-get 'flow_token data))) + (cond + ((exitter-find-subtask data "LoginEnterPassword") + (message "LoginEnterPassword") + (exitter-enter-password new-flow-token headers)) + ((exitter-find-subtask data "LoginEnterAlternateIdentifierSubtask") + (message "LoginEnterAlternateIdentifierSubtask") + (exitter-enter-email new-flow-token headers)) + (t (message "Cannot find any matching subtasks")))) )) :error (cl-function (lambda (&rest args &key error-thrown &allow-other-keys) -- cgit v1.2.3