Wordpress Integration (Non Livechat)

I run a community where members register themselves to access news and events etc. in WordPress. I would like to know how I can integrate Rocket.Chat into my WordPress community. Both my WordPress site and my Rocket.Chat server are running stand alone configuration and are not part of the open.rocket.chat servers or wordpress.com.

I want it to work in tandem with their user account. So if you have a user account you can access rocket.chat as well with that same user account.

What would be the best way to carry this out?

Could. I do this with OAuth2?

Yes you can do that with OAuth but I haven’t been able to find a good example yet? There are loads of fields that you have to fill out in the Oauth section, so if somebody has an example with some explanation then I would be very gratefull.

I have been googling all week to see if I find some modicum of explanation how to do this, with the Custom Oauth in Rocket chat, but there are no documentation written for this:

https://rocket.chat/docs/contributing/documentation/missing-and-outdated-list/index.html#custom-oauth

You would think, rocket-chat would add this documentation since they support it…

This is what I have done so far… (Using a test)

I went ahead and bought the WP O-Auth Plugin from https://wp-oauth.com/ and I configured my server… and generated the Client ID and Secret ID that I am going to use in Rocket.Chat:

I went to Rocket Chat, and in the Oauth section I added a new Custom Oauth

On this line: When setting up your OAuth Provider, you'll have to inform a Callback URL. Use https://chat.phideltagamma.net/_oauth/testauth <- do I have to add this in my Redirect URl above?

I fill out the Custom Oauth template in Rocket Chat, like you see here:

I then save my work and load the site:

If I manually enter my credentials I can log in successfully, no issues there. But If I try to click the CLICK HERE Button, I get redirected to: https://chat.mydomainhere.net/oauth/error/404

I have added the client ID and the Secret to the custom Oauth, and I am getting an error when you click on the area for the SSO, it sends me to: https://chat.phideltagamma.net/oauth/error/404 and it still looks like the login screen above…

I don’t have anywhere in Rocket Chat, that URL configured… So I don’t know why it’s sending me there…

I dont understand why this is failing… Can someone explain what I am doing wrong?

Someone else pointed to me that the form looks like <form id="login-card" class="content-background-color color-primary-font-color" method="/" novalidate=""> and the method is invalid as well as there is no action…

I also found that the paths for the Token Path and the Authorize Path had a typo, missing a _ in front, I fixed that and now when you click the blue button to log in it just takes me back to the login screen and nothing else happens.

I am stuck at the login screen after I succesfully SSO to Wordpress using auth0.com. When I click on a link that takes me to the RC login form it doesn’t start the login flow automatically. According to auth0.com this should be the case because I have an active session on their platform and both apps (RC and WP) are active in that account. if I click the oAuth button in the login form I enter the chatbox. That proofs that RC is seeing the active session.

There must be someone out there who managed to fix this?