Vipps Account Link Repository
Component Detail
Data Layer
low complexity
backend
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Persists and queries the mapping between a Vipps sub-claim identifier and a Meander user account. Supports account linking on first login and subsequent lookups to avoid duplicate user creation.
vipps-account-link-repository
Responsibilities
- Store vipps_sub → meander_user_id mapping on first successful login
- Look up existing Meander user by vipps_sub claim
- Support unlinking a Vipps identity from a user account
Interfaces
findByVippsSub(sub: string): Promise<UserLink | null>
createLink(sub: string, userId: string, personnummer?: string): Promise<void>
deleteLink(userId: string): Promise<void>