Vipps Integration Service
Component Detail
Service Layer
high complexity
backend
1
Dependencies
1
Dependents
2
Entities
0
Integrations
Description
Backend service responsible for the full Vipps MobilePay Login OIDC flow. Handles authorisation code exchange against the Vipps token endpoint, maps the Vipps sub-claim to a Meander user account, provisions new accounts on first login, and tracks monthly Vipps usage per organisation for billing purposes.
vipps-integration-service
Responsibilities
- Generate and validate PKCE code verifier and challenge for the authorisation request
- Exchange authorisation code for access and ID tokens via Vipps token endpoint
- Map Vipps sub-claim and personnummer to an existing or new Meander user record
- Issue a Meander JWT upon successful identity verification
- Record per-organisation Vipps login events for monthly fee attribution
Interfaces
buildAuthorizationUrl(orgId: string): string
exchangeCodeForTokens(code: string, codeVerifier: string): Promise<VippsTokenSet>
resolveOrCreateUser(vippsIdToken: VippsIdToken, orgId: string): Promise<MeanderUser>
issueSessionToken(user: MeanderUser): string
recordLoginEvent(orgId: string, userId: string): Promise<void>
Relationships
Related Data Entities (2)
Data entities managed by this component