Optional global invite code

Indeed but looking at the PR it’s a single code for the entire site.

Yes, we still have that feature around wrapped in a plugin:

The URL will be of the form: http://discourse.example.com/invite-token/redeem/TOKEN?username=USERNAME&email=EMAIL&name=NAME&topic=TOPICID

Bare minimum URL should be: http://discourse.example.com/invite-token/redeem/TOKEN?email=EMAIL

The security issue was that we did not check for the existence of user with the email address provided but now we do in the plugin.

9 Likes

I guess the username could be baked into the token be default and perhaps overwritten by adding an explicit user?

When it comes to token, I would prefer using code instead because it is comprehensible to non-technical people.

I believe not. While the tokens generated by the plugin don’t include emails, they can only be used by adding an email whereas here the idea is to remove that requirement, right?

And the security issue can be resolved:

This would be so awesome to have. :slight_smile:

4 Likes

Do these invite codes ever expire or are they good indefinitely forever? We might want a hard limit here as a site setting at least for now?

6 Likes

Don’t we still need an email address for GitHub - discourse/discourse-invite-tokens: https://meta.discourse.org/t/generating-lots-of-invite-links/17563 to work? It could be I misunderstand how it works.

What I’d like would be a tailored link (without an email address) that I could get organisations to send out to their punters, which would then assign them to a group and a starting topic when they sign up. The reason for this is that the medical organisations I deal with cannot / will not share their email list, but are happy to send an email to their members (from them).

3 Likes

I think both your request here and @nathankershaw’s feature request are pretty related.

At the moment we have 1 global invite code, it has no expiry, to expire it the admin can just zero out the code or change it.

What is being asked here is a more sophisticated mechanism for invite codes where it is integrated into the global invite system.

The key features that are being asked for

  • New invite link

    • reusable N times

    • (optionally) automatically adds user to group

    • expires after M days

So this to me feels like an extension of this dialog:

Perhaps a tab there?

[bulk invite]

  • Strip email

  • Strip send invite button

  • Add

    How many people are allowed to register using this link?

    How long would you like this invite link to work for? default 1 month.

So once you fill that up you would get an invite link that works for a limited time, integrates with the rest of the invite system, allows you to add people to groups and so on.

With that in place we can actually remove the whole “invite code” global feature.

16 Likes

Spot on - that would meet the need beautifully.

It would also be great to include a landing topic/post, as per the Bulk Invites via csv. Keeps it all consistent too.

6 Likes

If it is relevant to current global events I support prioritizing this work but it is your call to make @sam

9 Likes

No, invite-tokens does not need email address. See Generating lots of Invite Tokens to understand how it works.

7 Likes

I’ve read that, but remain confused.

This seems to imply very strongly that you need the user’s email. Or am I just being thick?

3 Likes

My understanding of bulk invite tokens is that you get one token per invite. This is very far away from what you are desiring here.

I will discuss this with @techAPJ I feel onboarding people efficiently to a new forum is very relevant and important in the current time. We are going to prioritize improving this story.

7 Likes

The email is required at the time of accepting invite but not at the time of invite token generation.

You can hand out this URL to end user and ask them to replace EMAIL with their email address: http://discourse.example.com/invite-token/redeem/TOKEN?email=EMAIL.

I hope this clears the confusion.

6 Likes

Very much liking your proposed solution in post 31 to this @sam, extending the functionality of invite codes.

4 Likes

Agreed that is also what I would really like to see implemented.

So that anyone that has access to the invite user permission is able to to generate a generic invite link that will let the user join and be added to the list of invited users of the referrer.

Invite to groups and with time/member limits would be nice but not a priority for me.

2 Likes

I’m getting a “Oops! That page doesn’t exist or is private.” when I try this.

amazing.forum.com/signup will pop up the signup modal, but amazing.forum.com/signup?code=fantastic doesn’t seem to pass the value into the modal (I also tried invite_code=fantastic).

And, when this works, it’d be nice to add it to the OP.

1 Like

Mixed on investing in improving this vs just extending existing invite system

9 Likes

Whatever you think is best works for me.

4 Likes

That would be excellent!

And this would make it perfect.

Maybe elaborating the pros and cons would help? What exactly is “this” referring to?

2 Likes

I want to retire the new system I introduced and instead improve the existing invite system

This related to the brand new global invite

14 Likes

Sam, where are you guys at with this? If it is imminent, I’ll hold off on trying to sign some of our organisations up.