# Wordpress Integration (Non Livechat)

**URL:** <https://forums.rocket.chat/t/wordpress-integration-non-livechat/1772>\
**Category:** Community Support\
**Created:** [August 7, 2018, 4:30pm UTC](https://forums.rocket.chat/t/wordpress-integration-non-livechat/1772 "2018-08-07T16:30:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tempusthales](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/tempusthales/32/485_2.png) [@tempusthales](https://forums.rocket.chat/u/tempusthales)\
**Post date:** [August 7, 2018, 4:30pm UTC](https://forums.rocket.chat/t/wordpress-integration-non-livechat/1772/1 "2018-08-07T16:30:52Z")

</div>

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](http://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?

---

<div class="post-metadata">

**Author:** ![tempusthales](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/tempusthales/32/485_2.png) [@tempusthales](https://forums.rocket.chat/u/tempusthales)\
**Post date:** [August 8, 2018, 3:42pm UTC](https://forums.rocket.chat/t/wordpress-integration-non-livechat/1772/2 "2018-08-08T15:42:41Z")

</div>

Could. I do this with OAuth2?

---

<div class="post-metadata">

**Author:** ![chatdev](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/chatdev/32/481_2.png) [@chatdev](https://forums.rocket.chat/u/chatdev)\
**Post date:** [August 9, 2018, 8:03am UTC](https://forums.rocket.chat/t/wordpress-integration-non-livechat/1772/3 "2018-08-09T08:03:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tempusthales](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/tempusthales/32/485_2.png) [@tempusthales](https://forums.rocket.chat/u/tempusthales)\
**Post date:** [August 15, 2018, 10:57pm UTC](https://forums.rocket.chat/t/wordpress-integration-non-livechat/1772/4 "2018-08-15T22:57:34Z")

</div>

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](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/](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:

 ![00%20PM](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/1X/0aeb9dd26e2caa3b1e8b47fbaa6bde5384e44a2b.png)

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:

 ![rc_custom_oauth_template](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/1X/74c7f785e204a336c608af9b30e60fea57c1a500.jpeg)

I then save my work and load the site:

 ![37%20PM](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/1X/c30ddc640b02ba211a3f5268d4c0001e53462c8d.png)

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](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](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?

---

<div class="post-metadata">

**Author:** ![tempusthales](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/tempusthales/32/485_2.png) [@tempusthales](https://forums.rocket.chat/u/tempusthales)\
**Post date:** [August 15, 2018, 11:29pm UTC](https://forums.rocket.chat/t/wordpress-integration-non-livechat/1772/5 "2018-08-15T23:29:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![chatdev](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/chatdev/32/481_2.png) [@chatdev](https://forums.rocket.chat/u/chatdev)\
**Post date:** [October 9, 2018, 2:54pm UTC](https://forums.rocket.chat/t/wordpress-integration-non-livechat/1772/6 "2018-10-09T14:54:50Z")

</div>

I am stuck at the login screen after I succesfully SSO to Wordpress using [auth0.com](http://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](http://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?
