User Invite Token Service
Component Detail
Service Layer
medium complexity
backend
0
Dependencies
1
Dependents
1
Entities
0
Integrations
Description
Service responsible for generating time-limited signed JWT invite tokens (48-hour expiry), persisting them to the database, and dispatching the onboarding email. The token links to the authentication module's onboarding flow where the invited user sets their password.
user-invite-token-service
Responsibilities
- Generate a signed JWT invite token with 48-hour expiry and persist it to the database
- Compose and send the onboarding email with the secure invite link
- Expose token verification for the authentication module's onboarding flow
- Invalidate consumed or expired tokens after successful onboarding
Interfaces
createInviteToken(email, orgId, roleId)
POST /api/v1/admin/users/invite
verifyInviteToken(token)
invalidateToken(token)