element-hq / element-hq/synapse

Users who register through GitHub cannot bind their email

Open
#14,326 0 comments 0 reactions 0 assignees View on GitHub
A-3PID A-SSO O-Occasional S-Minor T-Defect X-Needs-Info
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#14326](https://github.com/matrix-org/synapse/issues/14326).

---

### Description

When a user signs up through GitHub, the user cannot bind their email address and cannot back up the encryption keys.
It shows
![image](https://user-images.githubusercontent.com/62551256/198823487-08945511-fc4b-4b18-a232-9cf6b73e9dee.png)
But if you are a registered user via email, it's perfectly normal to do all this.

### Steps to reproduce

- Register via Github
- Bind a email address or backup the encryption keys

### Homeserver

hashi.sbs

### Synapse Version

Synapse 1.70.1

### Installation Method

Debian packages from packages.matrix.org

### Platform

Ubuntu 20.04.5
Python 3.8

### Relevant log output

```shell
No log
```

### Anything else that would be useful to know?

Related config file snippets
```
enable_registration_without_verification: false
registrations_require_3pid:
- email

oidc_providers:
- idp_id: github
idp_name: Github
idp_brand: "github" # optional: styling hint for clients
discover: false
issuer: "https://github.com/"
client_id: "***" # TO BE FILLED
client_secret: "***" # TO BE FILLED
authorization_endpoint: "https://github.com/login/oauth/authorize"
token_endpoint: "https://github.com/login/oauth/access_token"
userinfo_endpoint: "https://api.github.com/user"
scopes: ["read:user"]
user_mapping_provider:
config:
subject_claim: "id"
localpart_template: "{{ user.login }}"
display_name_template: "{{ user.name }}"

enable_3pid_changes: true
```

Re-login did not solve the problem.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the listed GitHub OIDC configuration on Synapse 1.70.1, then trace the email-binding and encryption-key backup flows for users registered through GitHub. Confirm whether the same flows work for email-registered users and identify the missing behavior before defining a fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, python
Domain
authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.