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.

Updated by Bricklou 22 days ago Author Actions #1

  • Description updated (diff)
  • Status changed from Draft to To Do

Updated by Bricklou 22 days ago Author Actions #2

  • Status changed from To Do to Planned
  • Assigned To set to Bricklou
  • Target version set to Server 0.1.0
  • Start date deleted (03/28/2026)

Updated by Bricklou 22 days ago Author Actions #3

  • Status changed from Planned to In Progress
  • Start date set to 11/04/2026

Updated by Bricklou 22 days ago Author Actions #4

  • Description updated (diff)

Updated by Bricklou 22 days ago Author Actions #5

  • Status changed from In Progress to In Review
  • % Done changed from 0 to 100

Updated by Bricklou 22 days ago Author Actions #6

  • Status changed from In Review to Done

Updated by Bricklou 22 days ago Author Actions #7

  • Status changed from Done to In Review

Updated by Bricklou 21 days ago Author Actions #8

  • Status changed from In Review to In Progress

Updated by Bricklou 21 days ago Author Actions #9

  • Description updated (diff)

Updated by Bricklou 21 days ago Author Actions #10

  • Status changed from In Progress to In Review

Updated by Bricklou 21 days ago Author Actions #11

  • Status changed from In Review to Done

Updated by Bricklou 20 days ago Author Actions #12

  • Status changed from Done to In Review
Actions

Also available in: PDF Atom