Users
Every project has its own accounts. You invite your users from the console, and the generated API only lets each of them read their own rows.
Invite or create directly
Two paths, depending on whether you want the user to choose their own password or to give them immediate access.
- Invitation: an email is sent with a link that lets the user set a password.
- Direct creation: the account is confirmed right away and the user signs in with the password you entered.
- An email already in use — in this project or elsewhere — is rejected. From the user page you can re-send access by email.
JavaScript
import { createClient } from '@kuunda/kuunda-js';
const kuunda = createClient(process.env.NEXT_PUBLIC_KUUNDA_URL!, process.env.NEXT_PUBLIC_KUUNDA_ANON_KEY!);
const { data, error } = await kuunda.auth.signUp({
email: 'utilisateur@exemple.com',
password: '••••••••',
});
if (error) throw error;
// Le profil porte le même identifiant que le compte : les politiques s'appuient dessus.
await kuunda.from('users').insert({
id: data.session?.user.id,
email: data.session?.user.email ?? undefined,
});Creating a user requires a client-side password: signUp creates the account, never a direct insert into the profile table.
Who can administer
The organisation owner and administrators create, invite and delete users. Other roles see the list and the user pages read-only.
Account and data profile
One user, two objects: the account that authenticates them, and their profile row in the project schema. The two must stay linked — the account identifier is the session token value, and it is what your security policies compare against.
- Profile without an account (common after a migration): import the source accounts, attach the existing accounts, or create the matching account — same identifier, confirmed email.
- Account without a profile: the console flags it and offers to repair the orphans.
- Search filters the current page; clear the field to get the full list back.
Deletion
Deleting a user removes their authentication account and then their profile. If the authentication service does not answer, the operation fails and deletes nothing: an outage is never read as “account already gone”, which would leave a live account behind a vanished profile.