Discourse Connect: How implementing Discourse login with an existing database?

AI-generated summary

Francesco_Bagnoli wants to implement DiscourseConnect to use existing user accounts from his database. He’s unsure how to retrieve the email and password from the Discourse login form. Falco advises creating a small web service to connect to the database and prompt the user for username and password.

Falco clarifies that when using DiscourseConnect, Discourse redirects every user login to the user’s own service, giving them control over signup, login, and group membership. This requires showing a login page on the user’s web service, not using the Discourse login form. Francesco_Bagnoli confirms his understanding of the process.

Hi, I have a database with username and password and I want use DiscourseConnect for use existing users account on Discourse forum.

I don’t understand how retrieve the email and the password that user input info the login form of Discourse.

Into my sso endpoint I receive the query parameters: ?sso=XXX&sig=XXX

But i need to receive username and password for check into the db…

You will need to create a small web service that connects to that database, and when receives a redirect with those parameters prompts the user for username and password and then redirects the user back to Discourse.

Ok, this means, when discourse redirect to my web service i show a login page? I thinked discourse use his login, and redirect to me after user press on login button

Yes!

When using DiscourseConnect we will just redirect every user login to a service you own, so you have 100% control over the whole signup, login, password requirement, group membership, etc.

Ok! now I have undestod! :grinning: