element-hq / element-hq/synapse

E-mail pushers are not created during registration when non-interactive SSO registration (`localpart_template`) is used

Open
#15,904 1 comment 0 reactions 0 assignees View on GitHub
A-Email-Push A-User-Experience O-Frequent S-Minor T-Enhancement
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

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

---

### Description

[synapse/handlers/register.py#L1008](https://github.com/matrix-org/synapse/blob/release-v1.87/synapse/handlers/register.py#L1008) need token to add email pusher.

But [synapse/handlers/register.py#L392](https://github.com/matrix-org/synapse/blob/release-v1.87/synapse/handlers/register.py#L392) doesn't provide any.

### Steps to reproduce

- add `enable_notifs: true` and `notif_for_new_users: true` config
- configure Synapse to accept SSO login
- provide SSO template for non-interactive registration (ie: localpart_template)
- provide SSO template for email
- login with a SSO account that provide some email attribute, according to prev config
- see that email notif are not enable => email pusher was not created at registration

### Homeserver

matrix.org

### Synapse Version

1.87

### Installation Method

Docker (matrixdotorg/synapse)

### Database

-

### Workers

Single process

### Platform

-

### Configuration

_No response_

### Relevant log output

```shell
-
```

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

The creation of email pushers should not rely on a token when registering, there is no need to track devices for them (see https://github.com/matrix-org/synapse/issues/15890)

Contributor guide

Open the contributing guide

Research direction

Read synapse/handlers/register.py around lines 392 and 1008, then reproduce the non-interactive SSO registration with email and notification settings enabled. Trace why the registration path lacks the token needed for email-pusher creation. Done means an eligible SSO user receives an email pusher during registration without requiring a device-tracking token.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authentication, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.