Change email for SSO user?

Not bad AI, happy with this answer:

AI explainer on auth overrides emails AI

sam:

what does auth overrides email do?

gpt4_bot:

Look up site setting context

Reading context for: auth_overrides_email

The auth_overrides_email site setting in Discourse is responsible for controlling email behavior in relation to external authentication providers. When set to true, this setting does the following:

  1. It overrides the local email address with the email address provided by the external authentication provider (e.g., SSO, OAuth) upon every user login.
  2. It prevents the user from making local changes to their email address within their Discourse account settings.

This feature is applicable to all authentication providers configured on the Discourse site. This setting is useful when you want to maintain email consistency and identity verification for users who are logging in through external services.

However, users should exercise caution with this setting, as discrepancies can occur due to the normalization of local email addresses. This means that if there is a difference in how the external system and Discourse format or handle email addresses, it could lead to mismatches or issues with account linking.

The default value for auth_overrides_email is false, meaning that by default, Discourse does not override local emails with external site emails on every login, nor does it prevent users from changing their email addresses.

When this setting is enabled, it affects various user permissions, including the inability to edit email addresses in certain cases, as managed by the site’s guardian and user guardian scripts. Additionally, the setting impacts how email fields are displayed and whether users are given instructions regarding email address changes within the user interface.