synapse
synapse copied to clipboard
OIDC `picture` and `emails` attributes dropped when terms of service is enabled in Synapse
Description
OIDC Emails and Pictures are dropped when terms of service is enabled in Synapse (See relevant log output) so new OIDC users do not have their emails added to their accounts automatically.
Steps to reproduce
- Set usermapping:
user_mapping_provider:
config:
email_template: '{{ user.email }}'
- Login as a new user, email is not added to account
Homeserver
N/A
Synapse Version
1.104.0
Installation Method
Other (please mention below)
Database
N/A
Workers
I don't know
Platform
EMS 16.70.1
Configuration
user_consent: require_at_registration: true
Relevant log output
synapse.handlers.sso - 560 - DEBUG - GET-159- Retrieved user attributes from user mapping provider: UserAttributes(localpart='testuser1', confirm_localpart=False, display_name='Test User1', picture='https://i0.wp.com/cdn.auth0.com/avatars/tu.png?ssl=1', emails=['[email protected]']) (attempt 0)
synapse.handlers.sso - 1081 - INFO - GET-164- [session nyBhoMLALAxvvBcP] Registered userid @testuser1:example.com with attributes UserAttributes(localpart='testuser1', confirm_localpart=False, display_name='Test User1, picture=None, emails=())
Anything else that would be useful to know?
No response
Same here on Synapse v1.107.
oidc_providers:
scopes: ["openid", "email", "profile"]
user_mapping_provider:
config:
picture_template: "{{ user.picture }}"
In my case all mappings work fine with the exception of the user picture. The user pictures are neither added nor updated.
The user consent has never been enabled in homeserver.yaml.
I am running a single Synapse instance (without an external media repo).