From 3deee80dd003d6723d5b33782eeefc9d01bfb28c Mon Sep 17 00:00:00 2001 From: Markos Gogoulos Date: Tue, 30 Dec 2025 19:53:30 +0200 Subject: [PATCH] fix --- lti/deep_linking.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lti/deep_linking.py b/lti/deep_linking.py index e7e69f8f..044dfc33 100644 --- a/lti/deep_linking.py +++ b/lti/deep_linking.py @@ -201,7 +201,8 @@ class SelectMediaView(View): lti_content_items.append(lti_item) # Create JWT payload - tool_issuer = request.build_absolute_uri('/')[:-1] + # Use client_id as issuer to avoid "wrong consumer key" errors in Moodle + tool_issuer = platform.client_id # Per LTI spec, aud should be the platform's issuer URL # Try just the platform URL (some Moodle versions don't accept arrays)