-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deep Linking - Fails for Blackboard #237
Comments
Hello, @tomitrescak is this solved...I was able to implement LTI in my org. and we even have customers using it on Avendoo and Moodle...let me know if you need help with this :) |
No, the deep linking is evading us. Linking of type “link” works but linking “ltitoollink” always leads to the “invalid link” above. I have no idea how to debug it. It seems like configuration issue or me not sending correct data. But it just does not work. |
Are you using any custom parameters? Would you be so kind to show me screeshot of your blackboard config and the code for deep linking route? This is mine: router.post("/deeplink", async (req, res) => {
try {
const resource = req.body;
const items = [
{
type: "ltiResourceLink",
title: "My Tool Link",
},
];
const form = await lti.DeepLinking.createDeepLinkingForm(
res.locals.token,
items,
{ message: "Successfully Registered" }
);
if (form) return res.send(form);
return res.sendStatus(500);
} catch (err) {
console.log(err.message);
return res.status(500).send(err.message);
}
}); |
Hello @tomitrescak I also have a medium article on this, so that no one has to break their head on how to implement LTIv1.3 I have a discord as well siddharthroyc_97017 , this will notify me on mobile..and I can help sooner...I would ask you to go through the code and the article, if the answer below does not help, or may be reach me out on discord. Ok, so you are asking if I am using any custom parameters for deep-linking- I think not because the LMS stores the link to the tool provided by me, but when the course is launched by the LMS I get a kind of id from the LMS and I use it to launch the course. For all my testing purposes I have used Moodle. For custom parameters, what I would do is may be call some endpoint to store those parameters somewhere just before the deeplinking request and retrieve them and use it when the course is launched -- dont know if this helps.. but may I ask why do you need custom parameters. |
Hello, this is very helpful and amazing article! I have a couple of questions:
Thanks a lot |
@siddrcrelias I read your medium article. Can you please tell me how to get the LTI_key. I am using node js with express. I am currently using the following code to create the public and private key to get the jwk:
It will create the 3 files in the root folder. public.key and private.key and jwk.json. I want to use Canvas LMS and there is an option while creating the the developer key, Public JWK. I am using this generated jwk to set there and using the public file at line in lti.setup
using the following code to setup the lti and register the platform.
while doing the deeplinking with the following code:
, when i submit the form with the deepLinkingMessage i got, i am getting the following error in canvas lms browser: { when i verified the deepLinkingMessage in jwt.io, it is saying that it is a "Invalid Signature". I am not sure at which step I am going wrong |
@KetulCodiste hello, ok tbh I did not create the keys myself ,this library itself creates it As to regarding your question, I am not sure I understand you correctly. And in all fairness I don't think you need to do anything regarding the keys other than using the given url, coz this library itself generates the key ( I don't know how it does it tbh ) , then we set the urls inside the LMS and as soon you launch a course or send a deep linking LTI request from LMS , LMS sends some signed data to your LTI1.3 application and then LTI middleware verifies it upon receiving and that's it you take control once the request is validated. Now the LTI request can be either a deep linking request or a course launch request. And all this is based of Oauthv2 so..🤷🏻♂️ |
Thank you for your response, @siddrcrelias . You're right—we don't need to do anything to retrieve the JWK keys, as LTI provides them. I’ve successfully implemented deep linking. Now, I’m exploring how to serve the frontend. My current setup includes: Backend: Node.js with Express. The website includes several CRUD operations, and I want to replicate those functionalities when deep linking is launched. I have a few questions regarding this: 1. LTI Integration with Existing Backend: 2. Serving the Frontend: 3. Authentication with JWT: I’d appreciate your insights on these points! |
Hi @KetulCodiste , sorry for replying late...was busy with some stuff..
Well to be honest with you you can do this in the same backend, you will need a different middleware/filter to intercept LTI requests and validate and pass it ahead.
In my head I like to keep things separate , till there is a pressing need to merge them or if I see there is a lot of duplication.
Here again I made a separate FE but I used the same components from A, just to minimize my work. I did not use the react files given in ltijs coz they are suppose to be a kind of reference. I kept a simple html in my BE code which basically redirects to the FE project and I did this because I wanted to de-couple my FE and BE and I did not want to do a build of the FE each time , replace it in the BE code
I am sorry I do not quite follow this, the entire auth part is already handled by LTIjs itself, you don't need to do anything other than figure out your spot in all this to how to place your content. When you deep link, you deep link a course from your server or infra to the customer's LMS. Your present website must be generating JWT after validating the user based on some checks and that mechanism but LTIjs already does that for you, that is why we exchange keys , certs and token endpoints in the beginning so that LTIjs can do the heavy lifting :) I hope the answers help :) |
hey @tomitrescak was your issue resolved ? |
This more of a questions.
Igot everything working but Deep Linking.
For some reason, when I submit the deep lnked form, it generates "Tool (Invalid Link)" In Balckboard fro me that I cannot click on. Any idea what could be the issue?
This is the jwt token generated by ltijs.
This is in Blckboard:
The text was updated successfully, but these errors were encountered: