HIGH story-bankid-vipps-authentication-peer-mentor-007 5 pts
5
Story Points
High
Priority
BankID & Vipps Authentication
Feature

User Story

As a user
I want my national ID number (personnummer) to be automatically synced to my organization's member record when it is available from Vipps login
So that So that my member profile is kept accurate and complete without requiring me to manually enter my personnummer in the app or on paper forms

Acceptance Criteria

  • Given a Vipps login where the ID token contains a personnummer claim, when the Vipps Integration Service processes the token, then it checks the user's member record for an existing personnummer value
  • Given a member record with no personnummer, when a personnummer is extracted from Vipps, then the member record is updated automatically and the sync is logged with a timestamp and source ('vipps-login')
  • Given a member record with a matching personnummer, when the same value arrives from Vipps, then no update is performed and the event is silently logged as 'confirmed, no change'
  • Given a member record with a conflicting personnummer, when a different value arrives from Vipps, then the conflict is logged for manual coordinator review and no automatic override is performed
  • Given a Vipps login where the personnummer claim is absent (user did not grant that scope), when the token is processed, then login proceeds normally with no sync attempt and no error shown to the user
  • Given a sync attempt that fails due to member system unavailability, when the sync service returns an error, then the authentication still succeeds, the failure is logged, and the sync is queued for retry without interrupting the user's session

Business Value

Missing personnummer values in member records are a critical data quality issue across all three organizations. They prevent correct identity matching, cause duplicate records, and complicate Bufdir grant reporting where beneficiary identity must be traceable. Automatically capturing personnummer at Vipps login resolves this without any user effort, delivering immediate data quality improvement as a side effect of authentication — a uniquely high-value outcome from a single technical implementation.