Sharing userbase


(Anthony Sekatski) #1

Hello to everyone.

If we setup a multisite, then we will have separated userbases - one per new site.

If there is some functionality to share one userbase for multiple sites? Not nickname registry, but one login for many discourse sites.

For example, we create 2 forums: if user sign up at first - then he will sign up at second automatically because of userbase sharing?


(Jeff Atwood) #2

There is no such functionality at this time. What would be the analog for WordPress? I’m not sure I understand the request. Can you describe it in terms of anything that currently exists for WordPress?


(Steve Baer) #3

I’m in the process of setting up 11 localized sites for discourse.mcneel.com to provide support for the 12 different languages that we provide our software in. As I’m setting everything up, I’m noticing that it sure would be nice to have a shared set of user accounts across all of these sites. Just checking in to see if anything like this has been implemented since your last response in August or if creating a new account for each site is “just the way it is.” I just wanted to know before I tell people they need to create new accounts.


(Sam Saffron) #4

All the hooks are in place but you would need some custom work to get it going.

Perhaps you should post a request for a plugin in the marketplace area, I would assume building and testing this kind of feature would be a few days to a week.


(Steve Baer) #5

I’m not sure I understand. Should I hold off from setting up these localized versions or do you think that a shared user system is something that could be added later?


(Sam Saffron) #6

I mean, all the infrastructure is in place for a shared user login system, however a plugin needs to be built to expose it.

This is not the kind of thing we are going to bake into core in the near/medium future.


(Kane York) #7

Okay then, how about per-user locales? :wink:


(Steve Baer) #8

I’m fine with hiring someone to write a plug-in for this. My concern is that I’m getting a bit of heat to bring our non-English discourse sites up and if I did so now before a shared user base plug-in was created, would that cause a problem later on when a plug-in was made? Would merging duplicate users on sites complicate the system?


(Jeff Atwood) #9

I don’t know @sam it seems reasonable to want to have multiple Discourse sites (on the same server / domain name only) sharing logins. I feel like this is something that might ought to be supported in core.

Because running multiple forums should be easy, if you want to do that… it’s a good option for scalability and different interests.


(Steve Baer) #10

What I am concerned about is if I have two sites under the current scheme where users have to create accounts (and will accidentally have different usernames) will this be a problem if a shared user base system ever became available.

Just asking so I know whether I should wait for a feature like this or just roll forward with separate userbases on our localized sites. Looking for advice…


(Steve Baer) #11

I’m going to assume that silence means that no one has good advice on what to do here (which is fine, I’m not complaining.) I can understand that it is hard to give advice on problems that may crop up with something that hasn’t even been written yet :smile:

I’ll just go ahead with running our localized sites and making users create new accounts for each site that they want to belong to. We’ll have to deal with the user “merging” in the future if there is ever a shared user base feature in discourse.


(Anthony Sekatski) #12

I think you can go with OAuth2 provider. It’s something I am working now (not for discourse, but later I can apply this to it easily).

I have a user management system on the main site and Omniauth with custom provider (using OAuth2) on other sites. OAuth2 is like a bridge for this.

I did something like this with Doorkeeper and Rails, but close discourse forum because of no users :smile:


(Aagat) #13

Any new development on this @codinghorror @sam ?

I am running into exactly the same problem as OP and it’d be nice to run a network of language specific sites with shared user base.

I have sites set up (multisite) as:
f.mysite.com
f.mysite.es
f.mysite.de


(Sam Saffron) #14

closest you can get to this now with zero hacking is to enable your main discourse site as an SSO provider and then point all the other sites at it.


(Aagat) #15

So for this to work, I’ll have to disable registration on all other site except the ‘main’ site (SSO provider) and redirect users to ‘main’ site for registration?

I guess enabling registration in all other sites in network would make it possible for someone else than original to user to register the username and impersonate?


(Sam Saffron) #16

yes

If you don’t have a single source of truth for registration this mechanism is bound to end up having tons of edge cases.


(Aagat) #17

Thanks.

I guess it’s a little inconvenient to send people to English site for registration especially if they don’t speak English, but this solution is maintainable and easy to implement (hopefully).

Again, Thanks for the help.

Cheers!


(Sam Saffron) #18

You can always be your own multi-language SSO endpoint on a diff domain if you insist.