∴ netop:// ウエハ's avatar

netop:// ウエハ

∴ NetOpWibby

FIGURED IT OUT

  if (requestObject.method === "POST" && requestObject.url === "/settings") {
      // TODO:
      // Check credentials with API before updating session
  
      requestObject.session.sessionUser = requestObject.body;
  
      requestObject.session.save(err => {
        if (err) {
          console.error(err); // TODO: Log this
          return (500, responseObject.end("Session save error...try again?"));
        }
      });
    }

I just added the above code to my authentication middleware and now it works.

I have another issue now though (less severe but still annoying). The Sapper session isn’t getting updated unless I do a hard refresh. This seems to be an issue with SPAs in general.

I’ll figure it out at some point but now it’s onto keyboard shortcuts!