Moodle Exception - public key

Moodle Exception - public key

- Eduardo Sousa Silva の投稿
返信数: 5
Hello people!
I have an error in my Moodle provider, Every time I try to publish a course as an external LTI tool and when accessing it through the consumer, this error appears on the screen when clicking on the course.
Exception - Unable to find public key.

Other information about this error

Debug info:
Error code: generalexceptionmessage×Ignore this notification

Stack tracking:

  • line 316 of /lib/lti1p3/src/LtiMessageLaunch.php: Packback\Lti1p3\LtiException thrown
  • line 455 of /lib/lti1p3/src/LtiMessageLaunch.php: call to Packback\Lti1p3\LtiMessageLaunch->getPublicKey()
  • line 149 of /lib/lti1p3/src/LtiMessageLaunch.php: call to Packback\Lti1p3\LtiMessageLaunch->validateJwtSignature()
  • line 71 of /enrol/lti/launch.php: call to Packback\Lti1p3\LtiMessageLaunch->validate()
What could it be ? thanks 笑顔 Follow the attachment
添付 MicrosoftTeams-image (1).png
Eduardo Sousa Silva への返信

Re: Moodle Exception - public key

- Eduardo Sousa Silva の投稿
PS: My connection between both was working fine until a week ago, so I'm thinking that it's a moodle configuration that could be causing this error. By the way, I had to change the site certificate for reasons of expiration
Eduardo Sousa Silva への返信

Re: Moodle Exception - public key

- Jake Dallimore の投稿
画像 Core developers 画像 Moodle HQ 画像 Particularly helpful Moodlers 画像 Peer reviewers 画像 Plugin developers 画像 Testers
Hi Eduardo,

That error simply means the tool site was unable to connect to the platform's JWKS endpoint to get the public key. Have you configured the tool properly with all the relevant platform details, including the JWKS endpoint? Is that endpoint publicly accessible? (it should be).

Cheers,
Jake Dallimore への返信

Re: Moodle Exception - public key

- Eduardo Sousa Silva の投稿
Eduardo Sousa Silva への返信

Re: Moodle Exception - public key

- Eduardo Sousa Silva の投稿

News!

I think I found out what might be happening, doing some tests on my other moodles that are already on the air, I found out that the ones that work with the LTI tool are from versions 4.1.5.

When I uploaded moodle to my server with version 4.2.2+ I didn't pay attention to testing the external tool.

Could there be a bug in version 4.2.2 for the external tool?

I followed this documentation to create my moodle provider and consumer -> if possible, can we update this documentation to the latest version of moodle (this if creating the external tool in 4.2.2 is ok)?

Jake Dallimore への返信

Re: Moodle Exception - public key

- Saul Rioja の投稿

Hi I have been trying to connect two Moodles (4.3.3) One is configured as a platform and the other is configured as a tool. My Moodles are running in Docker on Mac. 
I have the same problem (Unable to find public key), I tried everything I could, any help will be greatly appreciated image.png

image%20%281%29.png