Optional global invite code

Per:

A new options setting called invite_code was added.

When set, all accounts being registered must enter the invite code in order to be allowed account creation. Users without this code are not allowed to register an account.

If the invite is code is wrong user gets a helpful error:

Feature is 100% optional!. At the moment it is only compatible local auth however we will improve that in future iterations.

If you enable the global invite code it applies, if not it does not and the invite code will not appear in the registration dialog.

32 Likes

How does this make sense? Shouldnā€™t the code allow you to bypass staff new account approval?

5 Likes

The code is not about staff non staff this is 100% about new account registration.

The use case is posting on Whatsapp or a Facebook private groupā€¦

Hey I setup a forum for you, use the invite code ā€œWelcome to Discourseā€ to register an account.

Since the site requires registration only people with the code are allowed access.

We can certainly extend this, but I have an ultra urgent use case for this so I got this done today and will refine next week.

16 Likes

I super duper do not understand the use case for this?

Why not turn on new account approvals and point people at the site?

4 Likes

That requires manual moderation of each account. This setting is really very useful for those looking to test out with a few users or those running some kind of promo with forum access being a perk. Such an invite code will almost dramatically reduce work loads for pilot project forums as well.

11 Likes

Because I need to approve every single email and sit on the approval queue 24x7 and I donā€™t have any idea if this is a random bot that registered is really someone that should have access or not.

With an invite code I know that at least they had an invite code that I shared privately.

14 Likes

But isnā€™t that the whole point of approve users.

1 Like

This will help us with our COVID-19 response platform too - yes please, ASAP!!!

11 Likes

+1 for this feature, which is hugely useful for a number of communities I run. I get @codinghorror @ondrej point about manual approval above, but I think this fills a gap which exists between manually inviting everyone (ā€˜invite onlyā€™ site) and manually approving everyone (ā€˜approveā€™ users site).

7 Likes

We donā€™t want to approve users. We just want to post a code in a slack/telegram/whatsapp group and let everyone use it. Sometimes, a few extra testers before formal launch doesnā€™t hurt much.

3 Likes

Yeah, this feature would be immensely helpful right now! :smiley:

2 Likes

I also find this very useful, especially if the functionality is slightly extended so that it becomes possible to ā€œattachā€ groups to a specific invite code, i.e. someone creating an account using a specific code is automatically added to a specific group.

In some use cases, this might also solve the request for email independent invite tokens that comes up from time to timeā€¦

9 Likes

How is this materially different than

at least they had an URL that I shared privately

Because honestly the way it is now I super donā€™t get this feature.

5 Likes

Having the option of entering a bypass code OR admin approval makes the most sense here.

2 Likes

I am a fan of this in slightly different forms, it just needs some tweaking. If there is an urgent (?) need for it now then I guess thatā€™s fine?

I just donā€™t personally feel that the magic domain ā€¦

please sign up at https://forum.this-is-my-magic-domain.org

is a completely unusable and totally unworkable level of signup protection versus magic password ā€¦

you must know the secret this-is-my-magic-password to access this site

:thinking:

There are two form of this that I am super happy to support

Please visit amazing.forum.com and enter the invite code: fantastic to gain access (implemented)

And

Please visit amazing.forum.com/register?code=fantastic to register and gain access to the forum

We have probably passed a rule of 100 here given our general way of solving this problem is placing sites behind HTTP basic auth.

Both are quite similar, I implement #1 for now but will follow up with #2.

#1 has the advantage that it is a bit easier when you are not relying on cut-and-paste, eg get instructions over whatsapp and then use the desktop to complete.

#2 has the advantage that it reduces typing in fantastic and is handy for an ā€œemailā€ share vs a whatsapp share.

Not following where forum.this-magic-domain.org came from here? In both cases this is exactly the same domain the forum is on.

10 Likes

Hereā€™s a quick mock of what I thought the UI was going to look like for this:

image

(This is on a dev site with must_approve_users on, after email validation)

It should be optional at signup and optional at login-while-not-approved, because anything that mandates all users manage to copy the code around is going to break & need admin intervention.

Nope, guaranteed to leak. DNSDB Frequently Asked Questions (FAQ) - DomainTools | Start Here. Know Now.

This can work for time-boxed setups but not as a long-term posture.

1 Like

Why do you need an approval code AFTER you already created an account.

That means bots just register pointless accounts that you can eliminate way before they pollute your db?

Plus, your account is already registered, it may already be validated.

Also WTF, where is all this discussion about secret domains coming from.

If we enabled this on meta, for example:

Please visit meta.discourse.org and enter the code HELLOMETA to create an account.

5 Likes

I realize now I just accidentally reiterated @codinghorrorā€™s points from the previous topic. (which I had not read at time of writing, due to this being in #feature:announcements )

Essentially, this should be building on top of must_approve_users + login_required instead of making an entirely parallel system. The current implementation is fine as a hack to get us through the current crisis, but should be fixed up.

Someoneā€™s going to forget the code or not write it down if you present it at a conference. Or you need to cycle the code after the conf videos go up. Itā€™s a lot better to ask in your whatsapp group ā€œwhose account is @test3?ā€, get an affirmative response, and click

image

instead of trying to coax them through copying the code into the signup form correctly. (note: these screenshots are after email validation.)

1 Like

I think itā€™s fine, we just need to get to the eventual tweaks. There are definitely some improvements I fully support here.

First, integration with the user invites page, e.g. if you sign up on meta via visiting the link https://meta.discourse.org/signup?u=codinghorror then you show up as someone I invited on my user profile page, like so:

Remember that email based invites already grant TL1 to those users you invitedā€¦ so we already have that perkā€¦ check out the invite dialogā€¦ notice you can add group access, too, and the TL bump is implicit. We should probably spell this out in the copy here on this dialog, actually:

Second, you should be able to generate invite links with no email from the same place you send invites, per the above :point_up:ā€¦ this completely resolves the ā€œbut I donā€™t know their email addresses :crying_cat_face:ā€ problem.

Third, I think itā€™s fine for a site to be ā€œinvite onlyā€ and the invites are all in the form of hyperlinks plus a secret password. That way itā€™s

  • something you have (e.g. a link to a site)
  • something you know (e.g. the password open sesame)

And if your site has approvals, then the secret password lets you skip approval too. If you donā€™t have approvals, you canā€™t get in without the secret passwordā€¦

My main issue is that weā€™re not integrating with the existing features here, rather bolting on some random stuff through an obscure site setting. But we can integrate, to make the invite feature even better rather than a weird standalone site setting.

17 Likes