Cvmcosta / ltijs

Turn your application into a fully integratable LTI 1.3 tool provider.
https://cvmcosta.github.io/ltijs/
Apache License 2.0
300 stars 67 forks source link

Clarification: What should I do to login? #139

Closed kevinmamaqi closed 2 years ago

kevinmamaqi commented 2 years ago

Describe the bug I have set up a server with CANVA and LTI following what has been described in the documentation. I get to the point in which it seems to be working, but:

Expected behavior Clear documentation

RegisterPLatform:

const setup = async () => {
  await lti.deploy({ port: String(process.env.SERVER_PORT) }) // Specifying port. Defaults to 3000

  // Register platform
  await lti.registerPlatform({
    url: 'https://myCanva.org',
    name: 'app_name',
    clientId: 'client_id',
    authenticationEndpoint: 'https://myCanva.org/api/lti/authorize_redirect',
    accesstokenEndpoint: 'https://myCanva.org/login/oauth2/token',
    authConfig: {
      method: 'JWK_SET',
      key: 'https://myCanva.org/api/lti/security/jwks',
    },
  })
}

Configuration screenshot:

Screenshot 2022-02-18 at 20 30 16

I have also tried the demo server + demo app and I cannot make it work. All the URLs request are missing arguments.

Cvmcosta commented 2 years ago

Hello @kevinmamaqi, This part of the protocol is not documented as its not part of the Tool side portion of LTI. The launch (login) has to be initiated by the Platform (Canvas), you probably shouldn't start the launch request via Postman but it would be possible to retrieve the curl data from the browser after using Canvas to perform the launch.

Are you looking for instructions into how to get Canvas to perform an LTI launch? After you create the developer key you can register the app using the client ID generated and the tool should be accessible in the placements you defined. Maybe this Canvas tutorial will help.

Cvmcosta commented 2 years ago

I will be closing the issue for now.