Skip to content

Configure Canvas as LTI 1.3 Platform

Dmitry Viskov edited this page Aug 21, 2019 · 12 revisions

Consider game example in this repository as LTI 1.3 Tool.

  1. Canvas was installed locally in Docker using default manual:

https://github.com/instructure/canvas-lms/wiki/Quick-Start#automated-setup

  1. Enable LTI 1.3 in “Settings / Feature Options” (in the new test org):

  1. Go to the “Developer Keys” section and create new LTI Key:

Redirect URIs: http://127.0.0.1:9001/launch/
Target Link URI: http://127.0.0.1:9001/launch/
OpenID Connect Initiation Url: http://127.0.0.1:9001/login/
JWK Method: Public JWK (tool public key, use value from example: https://github.com/dmitry-viskov/pylti1.3/blob/master/examples/configs/public.jwk.json)
LTI Advantage Services: Enable all toggles

  1. Change “State” from OFF to ON for the new created key

  2. Create new External App: “Settings -> Apps -> +App”
    Choose “Configuration Type: by ClientID”
    Insert “ClientID” from the created Key (value from Details column)

  1. Update settings on the python side: https://github.com/dmitry-viskov/pylti1.3/blob/master/examples/configs/game.json
"https://canvas.instructure.com": {

    // from Canvas: Developer Keys -> value from Details column
    "client_id": "10000000000004",

    // static URL
    "auth_login_url": "http://canvas.docker/api/lti/authorize_redirect",

    // static URL
    "auth_token_url": "http://canvas.docker/login/oauth2/token",  

    // static URL to get Platform's public key
    "key_set_url": "http://canvas.docker/api/lti/security/jwks",

    // instead of fetch key_set_url every launch we may just insert static JWKS here
    "key_set": null,

    // Tool's private key 
    "private_key_file": "private.key",

    // copy deployment ID from the Canvas created app (screenshot below)
    "deployment_ids": ["6:8865aa05b4b79b64a91a86042e43af5ea8ae79eb"]
}

  1. On Canvas side go to Course Assignments and create new External Tool using Launch URL (http://127.0.0.1:9001/launch/):

Clone this wiki locally