Concepts
Invitations and codes
An invitation is a mail with a personal link to your product. The code in it proves two things: the person is invited, and the address is theirs.
Inviting
- One by one or several at once in the list in the dashboard.
- The next in line: enter a number, and those at the front are invited.
- Automatically: up to 100 a day, the front ones every day.
- From your own code, through the API.
The code
The link in the invitation leads to your product's address, with ?invite=<code>. The code is valid for 30 days and exactly once. If you invite someone again, the new code replaces the old one.
Your server checks it in two steps: verifyInvite when the page opens (uses nothing up, tells you the address) and redeemInvite when the account is created (exactly once).
Without a code
If someone comes without the link, say through your normal login, ask with isInvited about the address alone: is it invited or not?
In your login
Where the calls go in Clerk, Auth.js, Supabase Auth and Better Auth is shown in the login examples.