sono nuovo di Discourse e sto cercando di configurare il mio forum insieme a un sito Drupal, utilizzando il modulo SSO di Discourse. Ho seguito le istruzioni del modulo e questo argomento, ma purtroppo l’URL “mydrupalwebsite.com/discourse/sso” restituisce un errore 404.
Da quando è stato pubblicato quell’argomento, sono state introdotte nuove impostazioni per il modulo, tra cui una chiave API, ma non so come utilizzarla.
Can you share a link to the Drupal module that you are using? If it’s the module that’s linked to in this post, it was last updated in March of 2015, so it’s quite likely there will be issues with it.
I’m using the second one, with the latest version.
I’ve setup the sso secret and the sso url, and when I try to log in, I can see there has been some redirections like it should, but /discourse/sso is a 404 page.
Does the module have any documentation? The normal process for enabling SSO is to add the SSO endpoint to the Discourse sso url site setting, add an SSO secret key to the sso secret site setting, then enable the enable sso site setting. When first setting this up, you’ll probably also want to enable the verbose sso logging site setting. With that setting enabled, you’ll get details about SSO errors in your site’s error logs (found at Admin / Logs / Error Logs.)
When you have the Discourse settings enabled, you’ll need to be sure that your Discourse site’s URL and sso secret are added to the SSO provider site.
From the error you are getting, it seems likely that the enable sso site setting has not been enabled on your Discourse site.
If you run into problems accessing your Discourse site after having enabled SSO, as an admin you can bypass SSO login by going to /u/admin-login on your Discourse site. Enter your admin email address into the form on the page. A onetime login link will be sent to you.
I had a look at the log entry, but it is not showing the error - it’s just the log entry for the start of the SSO process on Discourse. There should be another log entry created shortly after that one that does show the error. Can you try going through the process again? There should be Verbose SSO log entries for each login attempt. The first entry shows the process starting on Discourse, the second entry will relate to how DIscourse handled the response it received from your website.
It is possible that there will be another relevant error message that does not begin with the text Verbose SSO log. Have a look at the log entries from right around the time that you’ve made the SSO request.
I tried again, and In got three identical log messages, which are the same as the previous one. If I follow, it must mean that there is no answer from my website at all.
Yes, that sounds correct to me. You could try looking at the requests that are being made by opening your browser’s web inspector to its Network tab. Select the “Preserve Logs” option on that tab and click the login link on your Discourse site.
Just a litte update on this matter : the Discourse SSO module has been patched and doesn’t crash the site anymore.
But it still doesn’t work since it’s impossible to properly log out once you’ve logged in once. Another issue has been opened, in case someone would like to look at it.
Sembra che il logout da Discourse non sia sincronizzato con il logout dal sito del provider SSO. Dato che sei ancora connesso al provider SSO, la prossima volta che clicchi sul link di accesso di Discourse, verrai autenticato in base alla tua connessione al provider SSO.
La configurazione del sito “logout redirect” di Discourse può essere utilizzata per disconnettere gli utenti dal sito del provider SSO. Quando un utente effettua il logout da Discourse, verrà automaticamente reindirizzato a quell’URL. Il provider SSO dovrà gestire l’URL per disconnettere l’utente. Tuttavia, non conosco abbastanza Drupal per sapere cosa sia necessario fare per implementare questa funzionalità.
Questo modulo funziona correttamente, c’è solo un bug relativo all’immagine del profilo utente di Drupal, ma è in attesa una patch,
Questo post contiene un errore riguardo alle impostazioni in Discourse: l’URL sso deve terminare con /discourse_sso, NON con /discourse/sso
Se desideri poter accedere con diversi account, devi impostare http://mywebsite/user/logout come reindirizzamento di logout e disabilitare Ghostery nel tuo browser per il sito Discourse se stai utilizzando questo plugin.