From 0471a1e0221584aa792f408971832d6b42b44528 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 17 Mar 2016 09:42:52 +0000 Subject: [PATCH] Comment why we're storing the session id --- src/Signup.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Signup.js b/src/Signup.js index 0f7403ef2c..5b368b4811 100644 --- a/src/Signup.js +++ b/src/Signup.js @@ -139,6 +139,11 @@ class Register extends Signup { }, function(error) { if (error.httpStatus === 401) { if (error.data && error.data.flows) { + // Remember the session ID from the server: + // Either this is our first 401 in which case we need to store the + // session ID for future calls, or it isn't in which case this + // is just a no-op since it ought to be the same (or if it isn't, + // we should use the latest one from the server in any case). self.params.sessionId = error.data.session; self.data = error.data || {}; var flow = self.chooseFlow(error.data.flows);