Developers/Workflow/User Invitation Flow: Difference between revisions
From wiki.storlye.com
Jump to navigationJump to search
Move invitation flow under workflow |
m Protected "Developers/Workflow/User Invitation Flow": Developers area managed by admins ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) |
(No difference)
| |
Revision as of 09:32, 15 June 2026
Developers/Workflow/User Invitation Flow
This page describes the current invitation flow used by Storlye.
Purpose
Allow a superadmin to invite a new user by email, WhatsApp context, or QR sharing using the same invitation token context in the active modal.
Entry Points
- POST /v1/admin/invitations/preview-link
- POST /v1/admin/invitations/send
- POST /auth/signup (with optional inviteToken)
- POST /auth/signup-confirmation/verify
- GET /v1/widgets/pending-people-invites
- PATCH /v1/user-connections/:connectionId/respond-me
Flow
- Superadmin opens invite modal.
- Frontend requests POST /v1/admin/invitations/preview-link.
- Backend creates a pending invitation row in user_invitations with token hash and TTL, then returns invitationId, inviteToken, and inviteLink.
- Frontend renders a QR code from the invite link. The link is already valid before pressing Send.
- If Send Invite is pressed, frontend calls POST /v1/admin/invitations/send reusing invitationId plus inviteToken and optional contact fields (email/whatsapp).
- Backend updates or creates invitation data and returns final inviteLink. If email is provided, email delivery is attempted.
- Invitee signs up using inviteToken in POST /auth/signup.
- Invitation status moves to signup_pending_confirmation and gets associated with invited user id.
- Invitee confirms account with POST /auth/signup-confirmation/verify.
- Backend attaches pending connection based on invitation context.
- Invitee can accept or decline in pending people invites widget via PATCH /v1/user-connections/:connectionId/respond-me.
Data Notes
- user_invitations stores token hash (never plain token), contact channels, status lifecycle, and inviter/invitee references.
- user_connections is updated after signup confirmation and finalized on invite response (confirmed or declined).
Current Behavior
- QR and Send in the same modal reuse the same token context.
- WhatsApp is stored as invitation context; automatic WhatsApp delivery is not integrated yet.
Maintenance Rule
- Update this page in the same change cycle whenever invitation endpoints, statuses, or flow steps change.
Last update: 2026-06-15 14:32:05 UTC