summaryrefslogtreecommitdiff
path: root/exitter.el
diff options
context:
space:
mode:
Diffstat (limited to 'exitter.el')
-rw-r--r--exitter.el18
1 files changed, 10 insertions, 8 deletions
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)