Closed cvwright closed 11 months ago
The admin API endpoint for registering users works almost just like the register client-server /register endpoint. However, it does not create a refreshable access token when one is requested.
/register
The fix appears to be to change this call https://github.com/matrix-org/synapse/blob/43d1aa75e8cbf9d522b425d51d5ac1a742b59ffb/synapse/rest/admin/users.py#L648
To something like this
should_issue_refresh_token = body.get("refresh_token", False) result = await register._create_registration_details(user_id, body, should_issue_refresh_token=should_issue_refresh_token)
GET /_synapse/admin/v1/register
POST /_synapse/admin/v1/register
refresh_token: true
refresh_token
expires_in_ms
Circles dev homeserver
1.94.0
Docker (matrixdotorg/synapse)
single PostgreSQL server
Multiple workers
Debian 12.2 x86, AMD EPYC, Hetzner cloud
No response
n/a
Closed in https://github.com/matrix-org/synapse/pull/16642
Description
The admin API endpoint for registering users works almost just like the register client-server
/register
endpoint. However, it does not create a refreshable access token when one is requested.The fix appears to be to change this call https://github.com/matrix-org/synapse/blob/43d1aa75e8cbf9d522b425d51d5ac1a742b59ffb/synapse/rest/admin/users.py#L648
To something like this
Steps to reproduce
GET /_synapse/admin/v1/register
POST /_synapse/admin/v1/register
with valid username, password, nonce, and mac, and withrefresh_token: true
in the JSON bodyrefresh_token
orexpires_in_ms
in the response bodyHomeserver
Circles dev homeserver
Synapse Version
1.94.0
Installation Method
Docker (matrixdotorg/synapse)
Database
single PostgreSQL server
Workers
Multiple workers
Platform
Debian 12.2 x86, AMD EPYC, Hetzner cloud
Configuration
No response
Relevant log output
Anything else that would be useful to know?
No response