Project

General

Profile

Actions

Sub-Task #124

open

Epic #105: Account & Preferences Management

Feature #106: Update profile information

User Story #109: As a user, I want my profile to be read-only when using a social login, so that my data stays consistent with my provider.

Sync user information from the OIDC/social provider (backend)

Sub-Task #124: Sync user information from the OIDC/social provider (backend)

Added by Bricklou 8 months ago. Updated 20 days ago.

Status:
In Review
Priority:
Normal
Assigned To:
Target version:
Start date:
11/04/2026
Due date:
% Done:

100%

Estimated time:

Description

Technical specification of 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: username, email and avatar.
  • The provider is the source of truth, which is why the profile is read-only for these accounts (#109).
  • The username is the provider's preferred username, then its name. It is applied when it is valid and free.
  • The email is applied only when the provider vouches for it, when it is valid and free. It then counts as verified.
  • Each change is written to the change log and announced as a profile change.
  • A value that breaks a rule or belongs to another account is skipped and logged. A failure of the sync is logged too. The sign-in succeeds in every case.
  • A suspended account is refused before anything is synced.

Avatar:

  • The avatar is taken from the picture URL of the provider, at the first sign-in and whenever that URL changes. The URL the avatar was taken from is kept with the identity, so the same URL is not downloaded again at each sign-in.
  • The picture goes through the same checks and re-encoding as an uploaded avatar, and replaces the previous one.
  • The URL comes from a third party: only public HTTPS hosts are fetched. The addresses the host resolves to are checked, then the connection is pinned to them. Redirects are not followed, the answer is limited to 5 MB and the request to 5 seconds.
  • A picture that cannot be fetched or read is skipped and tried again at the next sign-in. A provider without a picture changes nothing.

Acceptance criteria:

  • A changed username or email at the provider is applied at the next sign-in.
  • An email the provider does not vouch for is not applied.
  • A value that conflicts with another account is skipped and the sign-in succeeds.
  • Each applied change is in the change log.
  • The provider's picture becomes the avatar, and is not downloaded again while its URL is the same.
  • A picture that cannot be fetched, or is not an image, does not stop the sign-in.
  • Addresses that are not public are never fetched.
  • Every case is covered by a test, with a real database.
Actions

Also available in: PDF Atom