Hello
I’m building a website with a discourse forum. I would like to make sure that users can connect to discourse from the site’s login page and also create an account if they don’t have one. Is it possible to do this without having to redirect the user to discourse? I use PHP.
Thanks for your help
AI-generated summary
loukmane226 is seeking a way to connect users to a Discourse forum from their website’s login page without redirecting them to Discourse, using PHP. Stephen recommends using Discourse Connect, a single sign-on (SSO) solution, providing a link to the official guide. loukmane226 confirms understanding of the solution but requests a practical example to implement the following workflow: users access their website, log in, and if authenticated, the system checks their Discourse account status. If they exist, their details are returned; if not, they can register directly through the site, all without leaving the website.
Hey @loukmane226 ,
Take a look at Discourse Connect:
Hey @Stephen
Thanks for your response. I see it’s the solution, but I don’t understand how to use.
Can you help me with pratic example?
This is what I need to do :
- User will go on my website “mysite.com”
- By clicking on link for access to users area, a script will verify in session if user is connected. If connected he will have access to users area. If not, a login form will be displayed and he will enter email address and password.
- These informations will be used to verify if user is registered on my discourse. If yes discourse will return user informations
- If user not registered on discourse, he will be able to enter informations for registration.
This is what I would like to do, but I don’t know where start. Can you help me please?
Thank you