Jared Wenerd
[email protected]
Penn State University
Teaching & Learning with Technology, Data Empowered Learning Team
The following is example code used for a recent project writen in TypeScript that uses LTI 1.3 launch coming from Canvas. The example includes:
- check to make sure cookies are enabled
- OIDC login / authentication request to the LMS
- authenticating the response from the LMS (LTI Launch)
- display of data coming from LMS
npm install
npm run dev
note: This code makes use of a self-signed https certificate so can utilize iframe in LMS display when on local development. You may need to tell your OS to trust this self-signed certificate to work. See lines 10-17 of server.ts file
oidc_initiation_url: https://localhost:3000/lti/oidc
target_link_uri: https://localhost:3000/lti
An example JSON configuration for course navigation in Canvas is included at example/canvas-nav-example.json