Single sign-on with self-hosted Wordpress install

(Curtis Herbert) #1

I’m assisting in running a Wordpress-based site. It’s still pretty new, so although it started by using bbPress as the forum software, we’re not past the point of no return. There are a lot of hacks we’re going to have to do to get bbPress to work right (no post-preview support, for example) so I’m really eyeing up Discourse.

Is it possible to have Discourse use the existing Wordpress install as the source of logins? I’m looking to keep the site single sign-on (the one advantage bbPress gives). I’m ok if I need to script an initial migration and then all future ones are automatic. Anyone have experience with this?

(Ben T) #2

Well, I think it depends on what you mean by “using the existing Wordpress as the source of logins”.

Do you want wordpress to be the authority on user accounts (registration, management…) or Discourse?

You could set up your wordpress install as a openID provider, and force users from discourse to log in using this method only. This is pretty friction-less to set up, but leaves you reliant on wordpress for account creation. Also, it would pop up the register window for users new to discourse and ask for their e-mail address.

If I have some time, I’ll whip up an example of this. This is actually really trivial after remembering the plugin interface includes a simple openID example. You can also use any one of these.

If Discourse is the source of authority, you’d have to figure out a way to carry that auth to your other applications, and migrate your current data over. (CAS maybe?) There’s been some discussion of this over:

(Curtis Herbert) #3

Yes, I’d be looking to have WP be the authority, as that’s where the user accounts currently live and I’d like to avoid forcing users to sign up all over again. I’m OK on being reliant on WP for this.

Anyway to automate that registration process to avoid having the second (trivial) registration step just for Discourse? I’d assume I can hook in to WP with some post-registration hook, not sure if I could send something over to Discourse to auto-reg them?

(Thomas O'H) #4

Any update from you @parrots? I have the same need as you.

(Chris Aitken) #5

@parrots and/or @Apposl – curious whether either of you had success integrating WP and Discourse. Similar to you both, I’m looking for WP to “own” the master account information and control who can access Discourse.

Thanks in advance for any pointers/guidance you might be able to provide!

Cheers, Chris

(Vhajar Emortal) #6

Im wondering how to make it easier…