Sub-Task #124
Updated by Bricklou 22 days ago
Technical specification of On login, update the profile sync on sign-in through a login provider. * When an account that is linked to a provider signs in through it, the profile follows the provider's claims: user username, email and, once avatars exist (#108), and avatar from the avatar. * The external provider is the source of truth, which is why the profile is read-only for these accounts (#109). * Each change is written to the change log and announced as a keep profile change. * A claim that would break a rule (username taken, email used by another account, invalid value) is skipped and logged; the sign-in still succeeds. * Today the sign-in only resolves the account; nothing is synced yet. Acceptance criteria: * [ ] A changed username or email at the provider is applied at the next sign-in. * [ ] A claim that conflicts with another account is skipped and the sign-in succeeds. * [ ] Each applied change is data in the change log. * [ ] Every case is covered by a test, with a real database. sync.