-
-
Notifications
You must be signed in to change notification settings - Fork 81
Description
This is only a tentative question:
We're using LTIJS with our MeteorJS application and everything has been working fine so far. We've been using it in Serverless mode, attaching the LTIJS Provider.app instance to the internal Meteor ExpressJS server instance (via MeteorInstance.use("/ltitool", Provider.app))
The most recent version of MeteorJS is now using Express 5. If we upgrade to this version, LTIJS stops working.
The issue we're observing is the following: when LTIJS is redirecting, like here in Provider.js:
provMainDebug("Redirecting to endpoint with ltik");
provMainDebug(
"Redirect to:" +
req.baseUrl +
(this.#path || "") +
req.path +
"?" +
urlSearchParams,
);
return res.redirect(
req.baseUrl +
(this.#path || "") +
req.path +
"?" +
urlSearchParams,
);
the receiving code (in Server.js) doesn't see anything in req.query... it's just... empty!
this.app.use(async (req, res, next) => {
// Return if req.token is already defined
if (req.token) return next();
// Attempt to retrieve ltik from query parameters
if (req.query && req.query.ltik) {
req.token = req.query.ltik;
return next();
}
We see that the redirect is performed with the correct query params:
provider:main Redirect to:/ltitool/launch?ltik=<long token>
But the code receiving the request doesn't see anything in the request query params... I'm not sure yet if the issue is within Express 5 but I wanted to flag this and check if you guys have tried using LTIJS with Express 5 and, if so, if you're aware of any particular change needed to make request processing work as it should