Cvmcosta / ltijs

Turn your application into a fully integratable LTI 1.3 tool provider.

Home Page:https://cvmcosta.github.io/ltijs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CANNOT GET /

rscott78 opened this issue · comments

I'm using ltijs version 5.6.5. I have a local copy of Moodle setup as my test LMS. I'm attempting to use dynReg.

Here's my index.js file: https://gist.github.com/rscott78/f40058e0ade3152c6a6e1efe03051014

Here's when I get the error:

  1. Create a new external tool in moodle. Url is https://office.mysite.net:3000/register
  2. Moodle shows a new tool, I click "Activate"
  3. I go into my course, add a new tool, then pick the one I just added
  4. In Moodle, I click "Select Content" - in the resulting frame that opens up, I get a message saying "CANNOT GET /" -

Upon investigation, the URL is this: https://office.mysite.net:3000/?ltik=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwbGF0Zm9ybVVybCI6Imh0dHBzOi8vbW9vZGxlLXN0YWdlLnBlcmVncmluZWdsb2JhbC5jb20iLCJjbGllbnRJZCI6ImxIcWh3SUxEeFBhNDd3cyIsImRlcGxveW1lbnRJZCI6IjUiLCJwbGF0Zm9ybUNvZGUiOiJsdGlhSFIwY0hNNkx5OXRiMjlrYkdVdGMzUmhaMlV1Y0dWeVpXZHlhVzVsWjJ4dlltRnNMbU52Yld4SWNXaDNTVXhFZUZCaE5EZDNjelUlM0QiLCJjb250ZXh0SWQiOiJodHRwcyUzQSUyRiUyRm1vb2RsZS1zdGFnZS5wZXJlZ3JpbmVnbG9iYWwuY29tbEhxaHdJTER4UGE0N3dzNTJfTkYiLCJ1c2VyIjoiMiIsInMiOiIwYTBlOWRkYzE0MGUyMjkxYjhkOWY0MDVlYTQ3OTE5NGFlYmU2NjdhMWIxZjc5MTkzNCIsImlhdCI6MTY1NTMyNzYwMn0.UmBshwfq-SfiCtmiWNwzusu2U-3Sdj_07LkdrlABbgU

Any suggestions on what I might be missing?

Hello! My initial question is are you sure this tool is accessible to Moodle? I would also remove the specified appUrl and loginUrl from the setup since they are set to the default values and would also delete lti.app.get('/login',... since that is conflicting with the login endpoint created by Ltijs. Apart from that your code looks okay. Is the Moodle instance you are testing against yours? If so, how is it being hosted?

@rscott78 I will be closing this ticket for now as it has been a while. Please let me know if you have any more questions.