doldsimo / lti-1.3-canvas-lms Goto Github PK
View Code? Open in Web Editor NEWlti-1.3-canvas-lms
Home Page: https://doldsimo.github.io/lti-1.3-canvas-lms/
License: MIT License
lti-1.3-canvas-lms
Home Page: https://doldsimo.github.io/lti-1.3-canvas-lms/
License: MIT License
Originally posted by @Liziqiuqiu in #3 (comment)
Hi Simon,
This is not an issue, but rather a question I've come across. However, I'm unsure where to seek help. I will remove this if it's not the appropriate place to post this question.
In the readme document, the second step is to set up a Canvas instance. I've followed the Production Start tutorial and can access the instance. However, I'm unable to locate the login page; I don't know how to login into the system; all I can find is the public directory shown below. Could you please provide some guidance?
Thank you so much!!!
Have a wonderful Christmas season ahead!
Originally posted by @Liziqiuqiu in #3 (comment)
I am not sure if there is something I haven't set up correctly. I ran the backend and configured the developer key in the Canvas test server, but I encountered the following error. The test server is an Instructure-hosted server that uses HTTPS connection, and I used ngrok to create an HTTPS localhost.
{"status":400,"error":"Bad Request","details":{"message":"UNREGISTERED_PLATFORM"}}
const path = require('path')
const routes = require('./src/routes')
const lti = require('ltijs').Provider
// Setup
lti.setup('Thsisnenkskejeekw',
{
url:'mongodb://localhost/ltidb?authSource=admin', // connection to mongodb
}, {
staticPath: path.join(__dirname, './public'), // Path to static files
cookies: {
secure: true, // Set secure to true if the testing platform is in a different domain and https is being used
sameSite: 'None' // Set sameSite to 'None' if the testing platform is in a different domain and https is being used
},
devMode: false // Set DevMode to true if the testing platform is in a different domain and https is not being used
})
// When receiving successful LTI launch redirects to app
lti.onConnect(async (token, req, res) => {
return res.sendFile(path.join(__dirname, './public/index.html'))
})
// When receiving deep linking request redirects to deep screen
lti.onDeepLinking(async (token, req, res) => {
return lti.redirect(res, '/deeplink', { newResource: true })
})
// Setting up routes
lti.app.use(routes)
// Setup function
const setup = async () => {
await lti.deploy({ port: 3000 })
/**
* Register platform
*/
await lti.registerPlatform({
url: 'https://ourinstitution.test.instructure.com', // or url : 'https://canvas.exampledomain.com' (depends on config form Canvas instance) if iss is changed in config/security.yml file! It must be the same as the iss
name: 'Canvas',
clientId: '93420000000000349',
authenticationEndpoint: 'https://sso.test.canvaslms.com/api/lti/authorize_redirect',
accesstokenEndpoint: 'https://sso.test.canvaslms.com/login/oauth2/token',
authConfig: { method: 'JWK_SET', key: 'https://sso.test.canvaslms.com/api/lti/security/jwks' }
})
}
setup()
As per the readme setup locally using ngrok and it's working fine in the local machine. Now i want to publish my app in edu app center.
performed Step
-Create edu app center account.
-Admin section Configuration create XML. (My app is resource app so added only resource part. Please review my XML configuration https://www.eduappcenter.com/configurations/s4jad10k84qvkbxz.xml)
-Create app and fill basic details.
-Submit time generate (https://www.eduappcenter.com/configurations/s4jad10k84qvkbxz.xml) XML URL.
-Try to install this app in my canvas domain but getting below errors.
{"status":401,"error":"Unauthorized","details":{"description":"No Ltik or ID Token found.","message":"NO_LTIK_OR_IDTOKEN_FOUND","bodyReceived":{"oauth_consumer_key":"N/A","oauth_signature_method":"HMAC-SHA1","oauth_timestamp":"1691476570","oauth_nonce":"HB43bkdLxUlTUsmjXPjoqxCLLavln7GvBPcUt7gT80","oauth_version":"1.0","context_id":"9881e26effc6941d3ee7b519fe4aa70add6635d1","context_label":"JavaScript","context_title":"JavaScript","custom_canvas_enrollment_state":"active","ext_content_intended_use":"navigation","ext_content_return_types":"lti_launch_url","ext_content_return_url":"https://canvas.tecoreng.com/courses/1/external_content/success/external_tool_dialog","ext_roles":"urn:lti:instrole:ims/lis/Administrator,urn:lti:instrole:ims/lis/Instructor,urn:lti:role:ims/lis/Instructor,urn:lti:sysrole:ims/lis/SysAdmin,urn:lti:sysrole:ims/lis/User","launch_presentation_document_target":"iframe","launch_presentation_height":"500","launch_presentation_locale":"en-GB","launch_presentation_return_url":"https://canvas.tecoreng.com/courses/1/external_content/success/external_tool_dialog","launch_presentation_width":"500","lti_message_type":"basic-lti-launch-request","lti_version":"LTI-1p0","oauth_callback":"about:blank","resource_link_id":"9881e26effc6941d3ee7b519fe4aa70add6635d1","resource_link_title":"eFlok-08Aug-0001","roles":"Instructor,urn:lti:instrole:ims/lis/Administrator,urn:lti:sysrole:ims/lis/SysAdmin","selection_directive":"select_link","tool_consumer_info_product_family_code":"canvas","tool_consumer_info_version":"cloud","tool_consumer_instance_contact_email":"[email protected]","tool_consumer_instance_guid":"07UZznJ51F9yKAY81ryJXgIOMjYyLencmTnAnEuq:canvas-lms","tool_consumer_instance_name":"My site","user_id":"7ec98e027a42a4e84dbd62fa6f665e025c9fdf1d","oauth_signature":"het+8HFANu7NHERqk7jFVWe/Og0="}}}
Can you please help me how to solve this error?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.