Setting up Organization membership invites

I’m building an app that has multiple B2B customers. I am subscribed to the B2B Essentials plan.

I would like to provision new customers (businesses) and users (employees of those businesses) via the Auth0 dashboard. My workflow would look something like this:

  1. As an admin, I log into Auth0
  2. I create an Organization, let’s call it Foo, Inc.
  3. I invite users to that Organization

What I want to happen is that each of those users receives an invitation email which directs them to a “Set your password” or “Log in with your chosen provider” page that is specific to their organization (i.e. skipping the “Type in the name of your Org” box.)

This ticket: How to let user to create their password though email verification - #5 by hiran implies that on certain subscription plans this kind of feature might be available “out of the box”.

Unfortunately, unless you are using Organizations which is available on certain subscription plans, there isn’t an out-of-the-box way to trigger the invite flow.

I have followed the instructions on this page down to the point where I have (I think) configured my application to handle the invitation URL properly. I’m using Node.js, this is my /login controller code:

app.get('/login', (req, res) => {
  loginParams = {
    returnTo: config.baseURL
  }

  if (req.query.invitation) {
    // Then this user is being invited to join an application in our Auth0 account
    const { invitation, organization } = req.query;

    loginParams = { ...loginParams, invitation, organization };
  }

  res.oidc.login(loginParams);
});

The code properly recognises when the query params are present, but my invited user is still presented with the dialog box requesting their organization name.

I could be completely misunderstanding how this is supposed to work but the docs on this topic aren’t particularly helpful. Any advice anyone can give me would be much appreciated.

Thanks