Service Layer high complexity mobile
0
Dependencies
0
Dependents
2
Entities
0
Integrations

Description

Orchestrates the Vipps login OAuth2/OIDC flow, including token exchange and optional personnummer extraction. After successful token exchange via the Vipps API Gateway, syncs the personnummer to member systems where applicable and persists the Supabase session.

Feature: BankID & Vipps Authentication

vipps-integration-service

Responsibilities

  • Build Vipps authorization URL with SSO scopes including optional personnummer scope
  • Exchange authorization code for tokens via Vipps gateway
  • Extract and propagate personnummer from Vipps ID token to member systems
  • Map Vipps identity to Supabase user and persist session

Interfaces

buildAuthorizationUrl(requestPersonnummer)
exchangeCodeForTokens(code, codeVerifier)
extractPersonnummer(idToken)
syncPersonnummerToMemberSystem(userId, personnummer)
createOrLinkSupabaseUser(claims)
handleProviderError(error)
revokeTokens(accessToken)

Related Data Entities (2)

Data entities managed by this component