Files
sure/app/models
plind 6402f1dd08 fix(sso): preserve user-edited name across OIDC logins (#1777)
OidcIdentity#sync_user_attributes! runs on every SSO sign-in and
overwrote user.first_name / user.last_name with whatever the IdP sent,
because the precedence was `auth.info.* || user.*` — the IdP always
won when it supplied a value. A user who edited their first name to
"Adam" inside Sure had it reset to the IdP value "Ben" on the next
login, while the last name only "stuck" when the IdP happened not to
return a last_name (#1103).

Swap the precedence to `user.* || auth.info.*` so the IdP fills only
when Sure has nothing on file (first link or admin-blanked field).
Edits inside Sure are then authoritative for every subsequent login.
The audit copy on the OidcIdentity record itself is unchanged, so the
IdP-reported name is still available for debugging.

Closes #1103.

Co-authored-by: plind-junior <plind-junior@users.noreply.github.com>
2026-05-12 21:55:22 +02:00
..
2025-03-28 13:08:22 -04:00
2026-03-11 15:54:01 +01:00
2026-01-09 19:38:04 +01:00
2026-01-22 20:37:07 +01:00
2026-01-22 20:37:07 +01:00
2026-03-25 17:47:04 +01:00
2026-03-25 17:47:04 +01:00
2026-04-09 18:33:59 +02:00
2026-03-25 10:50:23 +01:00
2024-02-02 09:05:04 -06:00
2026-03-25 10:50:23 +01:00
2026-03-25 10:50:23 +01:00
2024-10-18 11:26:58 -05:00
2026-03-25 17:47:04 +01:00
2026-03-25 10:50:23 +01:00
2026-01-23 22:05:28 +01:00
2024-08-23 09:33:42 -04:00
2025-11-01 09:12:42 +01:00
2026-04-07 11:24:50 +02:00
2026-04-10 17:42:16 +02:00
2026-01-23 22:05:28 +01:00
2026-05-06 22:02:21 +02:00
2024-05-23 08:09:33 -04:00
2025-03-28 13:08:22 -04:00