-
Bug
-
Resolution: Fixed
-
Minor
-
4.0
-
MOODLE_400_STABLE
-
MOODLE_400_STABLE
-
MDL-74288-master -
-
QA time
Missed this during local testing, but it's clearly preventing the message event from being dispatched when testing using Moodle demo + ngrok public sites.
https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
Fix is simple: just use the issuer provided in the platform's openid config as the second param to the postMessage() call.
To replicate the issue:
- Create new site locally
- Make the site available over ngrok https
- Enable auth_lti and enrol_lti
- Go to Admin settings > Enrolments > Publish as LTI tool > Tool registration
- Generate a dynamic registration URL and copy it
- Now, log in to the demo/qa site as an admin (any public Moodle site where admin access is available)
- Go to Admin settings > Plugins > External tool > Manage tools
- Enter the dynamic registration URL in the "Tool URL" field
- Click "Add LTI Advantage"
Expected: the registration process runs through and you find yourself back on the manage tools page with a new tool card.
Actual: the registration process gets stuck on a blank screen and you need to cancel to get back to the tool list. The registration was created, but the process stalled because of the postMessage message failing to be dispatched. You'll also see a js console error to this effect.
- has a non-specific relationship to
-
MDL-69542 LTI: Update tool provider feature to support 1.3
- Closed