Coder Social home page Coder Social logo

doldsimo / lti-1.3-canvas-lms Goto Github PK

View Code? Open in Web Editor NEW
17.0 1.0 0.0 1.8 MB

lti-1.3-canvas-lms

Home Page: https://doldsimo.github.io/lti-1.3-canvas-lms/

License: MIT License

HTML 7.43% CSS 2.28% JavaScript 90.29%
canvas canvaslms lms lti nodejs reactjs lti-tool lti-system ltiadvantage lti-consumer

lti-1.3-canvas-lms's People

Contributors

doldsimo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

lti-1.3-canvas-lms's Issues

How do I set up the canvas instance?

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?
image

Thank you so much!!!

Have a wonderful Christmas season ahead!

Originally posted by @Liziqiuqiu in #3 (comment)

UNREGISTERED_PLATFORM"

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.
developer key

{"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()

How to deploy LTI-1.3-canvas-lms in eduappcenter?

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?

UNREGISTERED_PLATFORM

image

{"status":400,"error":"Bad Request","details":{"message":"UNREGISTERED_PLATFORM"}}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.