Integrazione del Sistema di Gestione dell'Apprendimento Discourse (Autenticazione LTI 1.3)

:discourse2: Summary Discourse LTI allows Discourse to integrate with a number of learning management systems via the LTI 1.3 standard.
:open_book: Install Guide This plugin is bundled with Discourse core. There is no need to install the plugin separately.

This plugin implements the LTI 1.3 standard for authentication, which is supported by a number of learning management systems. Discourse acts as a “Tool” within the LTI standard. Once configured, users will be able to click a button/link on the learning management system, and instantly be logged into Discourse.

Precise setup instructions will vary based on your Learning Management System. But in general:

  1. Create a new “Tool” entry in your learning management system
  • LTI Version: 1.3
  • Launch URL: any URL on your site. Users will be directed here after login
  • Auth Request URL: https://<your-discourse-site>/auth/lti/initiate
  • Redirect URL: https://<your-discourse-site>/auth/lti/callback
  • Tool Public Key - leave blank. Discourse never sends data to the LMS
  1. In your LMS, find the 'Authorization endpoint", “Tool Client ID”, “Platform Issuer ID”, and the “Platform Public Key”, and add them to the relevant site settings in Discourse. In Discourse, the settings can be found by searching for lti in the Discourse site settings UI.

  2. If your learning management system guarantees User emails have been validated, enable the lti email verified site setting. :warning: Warning: If your LMS does not verify emails, enabling lti email verified is a security risk.

  3. Turn on the lti enabled site setting

If these instructions don’t make sense for your LMS, please post in the topic below and we’ll do our best to update the instructions accordingly.

What if my site is invite_required?

If you want your users to go through the Discourse invite redemption flow when they first log in, you can use LTI “Custom Properties” to specify a Discourse invite link. New users will be directed to the invite, while existing users will be sent to the regular launch URL. For example:

Property Name Property Value
discourse_invite_link https://discourse.example.com/invites/abcdefg

Last edited by @tobiaseigen 2025-07-16T21:17:34Z

Check documentPerform check on document:
22 Mi Piace

Hai istruzioni specifiche per l’integrazione LTI con Canvas LMS?

1 Mi Piace

Avrai bisogno che i tuoi amministratori eseguano l’integrazione

Sono uno degli amministratori e anche un ingegnere del software. Penso che il problema che sto riscontrando abbia a che fare con i cookie e con lo “stato” tra Discourse e Canvas che non corrispondono.

Questo è l’errore che sto ricevendo nei log di Discourse:

(lti) Authentication failure! state_mismatch: StandardError, State parameter did not match the session

Penso che quell’errore venga generato da qui: discourse-lti/lib/discourse_lti/lti_omniauth_strategy.rb at main · discourse/discourse-lti · GitHub

Avete qualche idea o qualcosa che posso approfondire per aiutare a risolvere questo problema? In questa pagina della documentazione di Canvas: Overview of an LTI Launch <a name="launch-overview"></a> - Canvas LMS REST API Documentation

C’è una sezione “Launching without Cookies” che penso sia pertinente qui. Ma non ne sono sicuro al 100%. Qualsiasi aiuto o suggerimento sarebbe molto apprezzato.

Sono riuscito a far funzionare l’LTI in Canvas con un’unica avvertenza. Ecco i miei passaggi:

  1. Crea una chiave sviluppatore in Canvas. Non importa cosa inserisci nel Metodo JWK e JWK pubblico

  2. Nelle impostazioni LTI di Discourse, compila le tue impostazioni

  3. Per la chiave pubblica, puoi navigare su https://\u003cyour_canvas_url\u003e/api/lti/security/jwks e copiare la seconda chiave. Quindi puoi andare su https://8gwifi.org/jwkconvertfunctions.jsp e incollarla lì e convertirla. Quindi copia il testo tra -----BEGIN/END PUBLIC KEY----- e incollalo nella Chiave pubblica della piattaforma Lti nelle impostazioni LTI di Discourse. Quindi salva.

Ecco l’avvertenza. Quei JWK che Canvas genera vengono ruotati, apparentemente mensilmente. Una volta che quella seconda chiave cambia, l’LTI si interromperà e dovrai sostituirla con quella nuova seguendo il Passaggio 3.

Il plugin LTI di Discourse dovrà supportare un URL JWK pubblico affinché rimanga aggiornato.

2 Mi Piace

Posso avere pi[u00f9] LMS integrati con un singolo Discourse?

:partying_face: Questo plugin è ora incluso nel core di Discourse come parte di Bundling more popular plugins with Discourse core. Se stai auto-ospitando e utilizzi il plugin, devi rimuoverlo dal tuo app.yml prima del tuo prossimo aggiornamento.

1 Mi Piace