-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WordPress integration #747
Comments
Someone with WordPress knowledge can take this? |
I know quite a bit about Wordpress, but not a lot about meteor. I can try and pitch in on the WP part once a general approach has been laid out by someone who knows both. |
@nonsintetic I think we need your help here indeed.
|
I can write plugins, sending alerts to a REST api should be easy as pie. I'm guessing we could send alerts for things like new post, new comment, new user registration, maybe even admin stuff such as when Wordpress is auto-updated. |
That's great. We are working on the integration points. I'll get your a doc with the API to test. If you can help, it would be awesome!!!! |
Good, I'll make something as soon as I get it. Regarding SAML plugins, the only one available that doesn't use an external SaS service is https://wordpress.org/plugins/saml-20-single-sign-on/, it's basically an implementation of simplesamlphp (https://simplesamlphp.org/). It makes Wordpress a SAML SP, it works, but it's kind of hacked-together if you ask me. The way I see it is: what would be useful is to have a plugin that makes Wordpress an IdP instead and use Rocket Chat as a SP. That way you can just keep using the Wordpress login functions, login screen and database for storage like before, just add a plugin for RC. There isn't one available at this moment, but one could be written using simplesamlphp without too much hassle. Otherwise, migrating to a different accounts system to use a chat system would be overkill for most people, especially since most of them already have users signed up to their WP site. |
@nonsintetic I think we are saying the same thing. I don't want people to have to migrate to a different accounts system. We want to keep WP and the Identity Provider, either via SAML or oAuth, and Racket.Chat will just use our generic packages to login using those credential.. as you can with Facebook, LinkdeIn, GitHub, etc on our https://demo.rocket.chat server. So how should we start? |
Shall we use this? |
I have that plugin installed on my test server and it works fine, all it really needs is a rocket.chat plugin very similar to the Gitlab one (a generic oAuth plugin). I'm not sure how Gitlab works, but I imagine it's just the links that differ. If you want i can set up a public Wordpress install with that plugin enabled and give you guys the keys so you can test it out. |
Hi @rodrigok can you help? |
@nonsintetic and @engelgabriel now we have buttons on section accounts to add a custom oAuth section, so you can configure the login with wordpress their I think. |
Ok I've had a very long chat (on Rocket Chat!) with marcelo.rocket.team and we've managed to log into RC with Wordpress. Unfortunately there was an issue with RC expecting 'id' in the response instead of 'ID' which is what came from Wordpress in the /oauth/me info, details on how it was fixed below in the tutorial. Here's how it was done:
Wordpress Side:
After all these steps have been completed, if the client ID and the secret match between RC and WP, if the fix is applied. You just go to your rocketchat and click the newly appeared button to log in, if you're not logged into wordpress you'll get the wordpress login screen in a popup. Possible errors encountered (by me):
|
Thank you very much, @nonsintetic! I'll add this to the wiki, so it doesn't get lost. |
This should be updated. Now this is a built in feature with Rocket Chat. |
@marceloschmidt, should we update the WIKI? |
Does this still work or do I need to edit the template's functions.php because I got this
|
Now(WP OAuth Server v3.1.8) I need to add these code $me_data['id'] = $me_data['ID'];
$me_data['name'] = $me_data['username']; into |
WP OAuth Server updated to 3.2 and I can't get it to work with rocketchat. Is there a wordpress saml server to provide rockets with username/password? |
I am getting this from my logs. [34mW20161219-18:15:38.588(0) (oauth.js:101) �[35mUnable to base64 decode state from OAuth query: undefined |
Anyone upgraded 3.2 and has it working? @IQ2022 @nonsintetic @rankun203 @syedalamabbas |
I'm also interested in this |
if we have funds, i think we should probably look to get some professional Wordpress programmer to build a plugin for RC that does complete membership integration .. and user database sync between both ends.. given 3/4 world sites are running wordpress so, i think its worth it.. |
would it better if RC was able to look at the WP DB for users? |
would be nice if they can actually create a membership plugin that handles Wordpress :) like member+ or https://codecanyon.net/item/ultimate-membership-pro-wordpress-plugin/12159253 plugin :D |
The built-in RC Wordpress oAuth doesn't seem to work with WP oAuth Server at all. I've had some luck with custom oAuth, but I'm having the same issue as @wargamesqcf. I've included the gist fix above and am not getting the missing
Works:
Does not work:
I'm using WP oAuth 3.2.001 non-pro. |
So RC is just the one messing up or is the free app? |
@wargamesqcf Basically, if the user is already logged into WP, I can get the RC oAuth to work, but if they are not logged in, RC login does not work. RC Custom oAuth:
WP oAuth Server:
|
I just get /oauth/error/404 when I try this thanks for trying atleast. |
I've had a few people comment on this. Here's what worked for me... Enable True WPOAuth 3.2.87 Grant Types Misc Settings OpenID Connect 1.0a Token Lifetimes Redirect URI: https://members.peerunschooling.net/_oauth/punetauth |
Check my post I just dropped on this article:
#747
That's how I did the settings.
Then, I created an iframe in my WordPress page using this code:
<iframe src="https://members.peerunschooling.net" style="position:
absolute; top: 60;left: 0; width: 100%; height: calc(100% -
60px);"></iframe>
This positions a full-screen iframe just below my header containing the
RocketChat app.
Jim Flannery
jim-flannery.com
p. 860-578-4966
e. [email protected]
s. jim_flannery
…On Tue, Feb 21, 2017 at 3:56 PM, wargamesqcf ***@***.***> wrote:
I have no idea what iframe is but can you walk me through how you did it?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#747 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AL_pYnO3qvxTP3MJHBdjpoWnTFeLUCRDks5re09rgaJpZM4F6ixm>
.
|
Thanks Jim. |
So, overall, is it possible to use the non-pro version to do this, or not? I've tried with the settings, and a WordPress sign-in page loads, et citera, but it suddenly ends with a "Internal Server Error." The error in logs is: �[34mI20171014-20:51:02.644(0) Exception while invoking method 'login' SyntaxError: Unexpected token < at Object.parse (native) at CustomOAuth.getAccessToken (/snap/rocketchat-server/1142/programs/server/packages/rocketchat_custom-oauth.js:166:17) at Object.handleOauthRequest (/snap/rocketchat-server/1142/programs/server/packages/rocketchat_custom-oauth.js:224:28) at OAuth._requestHandlers.(anonymous function) (packages/oauth2.js:27:31) at middleware (packages/oauth.js:203:5) at packages/oauth.js:176:5 |
1- wordpress user integration
if not
2- signup/login within wordpress/ webpage as an API?
3- Send alerts to (specified) channels once a new post is published.
The text was updated successfully, but these errors were encountered: