Store the session token issued at sign in
This commit is contained in:
parent
c4bc712972
commit
ca5c25ef14
1 changed files with 2 additions and 1 deletions
|
|
@ -61,7 +61,8 @@ document.getElementById("form").addEventListener("submit", async function (e) {
|
||||||
btn.disabled = false; btn.textContent = "Continue";
|
btn.disabled = false; btn.textContent = "Continue";
|
||||||
|
|
||||||
if (!r.ok) { showMsg("msg", r.error || "That did not work. Please try again."); return; }
|
if (!r.ok) { showMsg("msg", r.error || "That did not work. Please try again."); return; }
|
||||||
Session.set(r.user.email, r.user.display_name || name);
|
// The token is the credential from here on; the email is only for display.
|
||||||
|
Session.start(r, r.user.email, r.user.display_name || name);
|
||||||
showMsg("msg", r.returning ? "Welcome back. Taking you through…" : "Account created. Taking you through…", "ok");
|
showMsg("msg", r.returning ? "Welcome back. Taking you through…" : "Account created. Taking you through…", "ok");
|
||||||
setTimeout(function () { location.href = next; }, 550);
|
setTimeout(function () { location.href = next; }, 550);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue