Skip to content

Invitations

Invitations are the way to allow new identities to become users. Process Focus does not have a mechanism to create users. Users are always verified identities. Users must identify themselves first.

But identification is not enough: they also must have permission to access the system. This permission can be explicitly granted by creating invitations in code or in the Dashboard. It can also be implicitly granted to those who are members of a group, for example. Support for this depends on SSO providers.

During development it’s useful to have invitations in code, so you can log into local systems more easily:

import { Invitation, Organisation, Role } from "@pf/process"
const employee = new Role(org, "Employee")
new Invitation(org, "alice", {
email: "alice@example.com",
roles: [employee],
})

For local development, build and import your organisation first so its database contains the current migrations and roles. Then create an invitation with pfcli, using existing roles’ full paths:

Terminal window
pfcli invitation create path/to/your/project --email alice@example.com --role /Employee --role /Administrator

Supply at least one --role; repeat it to assign multiple roles. This command requires local database write access, not Dashboard authentication. It creates the invitation without a registration link. For passkeys, create a registration link afterwards.

Click on “Users & Sign-in” on the sidebar to see pending invitations:

Pending invitations on the Users & Sign-in page

Add an invitation by clicking “New invitation”:

New invitation form with email and role assignments

Depending on your chosen identity provider, you may get the option to send the user a registration link. If you use an identity provider like Google Workspace, the user can simply go to the main URL and log in from there. No separate registration link is needed.