Membership Invitation Service
Component Detail
Service Layer
medium complexity
backend
1
Dependencies
1
Dependents
1
Entities
0
Integrations
Description
Generates and validates time-limited invitation tokens used to onboard peer mentors and coordinators into a specific organizational unit. Tokens are single-use and carry the target organization and intended role as signed claims.
membership-invitation-service
Responsibilities
- Generate signed, time-limited invitation tokens bound to a specific organization and role
- Validate and consume invitation tokens during onboarding (marks token as used)
- Expire and clean up stale tokens beyond the configured TTL
- Integrate with the notification dispatch layer to send invitation emails or SMS messages
Interfaces
createInvitationToken(organizationId: string, role: string, expiresInHours: number): Promise<InvitationToken>
redeemToken(token: string, userId: string): Promise<Membership>
revokeToken(tokenId: string): Promise<void>
listPendingInvitations(organizationId: string): Promise<InvitationToken[]>
Relationships
Related Data Entities (1)
Data entities managed by this component