Skip to content

Commit f243bd9

Browse files
committed
feat(auth): profile pictures
Accounts can set a profile picture. Apps receive it as the standard `picture` claim under the `profile` scope, and both SDKs read it. Every avatar in auth's pages and the admin dashboard shows it in place of the initials. Administrators can view and remove one, with a reason, from the dashboard and the CLI. The settings get a Profile tab showing the account as apps see it, with rows for the handle, the display name and the picture, each changed in a dialog that opens with no script. The handle and display name move there from Sign-in methods. Page notices can be dismissed. Uploads are decoded under size and allocation limits and re-encoded as a 512px square JPEG, so no upload bytes or metadata are ever stored. Pictures live in Postgres and are served at /pictures/{id} with immutable caching; the id changes on every upload. Closes #321.
1 parent 09c6ede commit f243bd9

137 files changed

Lines changed: 3176 additions & 524 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Cargo.lock‎

Lines changed: 213 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ unicode-normalization = "0.1"
8383
uuid = { version = "1.19", features = ["v7", "serde"] }
8484
webauthn-rs = { version = "0.5.5", features = ["danger-allow-state-serialisation", "conditional-ui", "workaround-google-passkey-specific-issues"] }
8585

86+
# Profile pictures: decodes the formats uploads may use, pure Rust, and writes the
87+
# JPEG every stored picture is. No AVIF (C or a heavy encoder), no SVG, and no WebP
88+
# until its decoder checks a frame's size against its canvas before decoding it.
89+
image = { version = "0.25", default-features = false, features = ["jpeg", "png", "gif"] }
90+
8691
# Transactional email: SMTP over implicit TLS or required STARTTLS, with rustls
8792
# (ring, as reqwest uses) and webpki roots, never native-tls/OpenSSL.
8893
lettre = { version = "0.11", default-features = false, features = ["builder", "smtp-transport", "tokio1-rustls-tls"] }

0 commit comments

Comments
 (0)