LTI auth.php: invalid request

LTI auth.php: invalid request

per Gerald Truong,
Number of replies: 2

Hello,

We are unable to launch an external tool using LTI 1.3 at the point where the external platform makes the following request:

https://moodle.franu.edu/mod/lti/auth.php?scope=openid&response_type=id_token&client_id=t6rp6MwRR6Dnfit&redirect_uri=https%3A%2F%2Fed.link%2Fapi%2Fauthentication%2Flti%2F7cea37a5-6b34-43c2-a390-afffb8a4e1cf%2Flaunch&login_hint=7455&state=XXlAp7hagCngDHQqLQQX2bFMFSnBbKdS&response_mode=form_post&nonce=cbec2d68-3193-499c-ab48-43c0da1a8589&prompt=none&lti_message_hint=%7B%22cmid%22%3A376129%2C%22launchid%22%3A%22ltilaunch1243_1640108836%22%7D

 And we get a page with an invalid request error but no details... We went over the query parameters and they look correct.

Any guidance on how we could debug this issue?

Average of ratings: -
In reply to Gerald Truong

Re: LTI auth.php: invalid request

per Jake Dallimore,
Avatar Core developers Avatar Moodle HQ Avatar Particularly helpful Moodlers Avatar Peer reviewers Avatar Plugin developers Avatar Testers
Hi Gerald,

That error almost certainly comes from this code: https://github.com/moodle/moodle/blob/a800e7e62f73d82d04926f72333384d7cc31e01e/mod/lti/auth.php#L90-L94

So, either:
  1. The tool config cannot be found at all (probably unlikely) or
  2. The too config doesn't have 'https://ed.link/api/authentication/lti/7cea37a5-6b34-43c2-a390-afffb8a4e1cf/launch' stored as a redirection URI.

You could enable developer debugging on the site, which would give you a stack trace during that launch and tell you which of the above you're tripping up on, or you could just double check the tool config's redirection URIs, which is where I suspect the issue will be.

Hope that helps,
Jake

Average of ratings:Useful (1)