WaspW
Wasp17mo ago
devrim

context.user is empty on api endpoint

export const fooBar = (req, res, context) => {
  res.set("Access-Control-Allow-Origin", "*"); // Example of modifying headers to override Wasp default CORS middleware.
  res.json({ msg: `Hello, ${context.user ? "registered user" : "stranger"}!` });
};


this example i'm trying from the tutorial, regardless of auth:true/false has null as context.user, any ideas why?
Was this page helpful?