Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Use /admin/v1/register in create-account #2484

Merged
merged 13 commits into from
Aug 12, 2022
Merged

Conversation

S7evinK
Copy link
Contributor

@S7evinK S7evinK commented May 24, 2022

The create-account utility is updated to use the existing /_synapse/admin/v1/register endpoint, similar to register_new_matrix_user on Synapse. This ensures all needed functions are called to propagate e.g. account data.
Unfortunately, this means "passwordless" accounts can't be created anymore.
Resetting a password still uses a direct database connection.

@S7evinK S7evinK requested a review from a team as a code owner May 24, 2022 07:13
@neilalexander
Copy link
Contributor

Things like this make me wonder whether we should turn user creation into an admin endpoint instead of having create-account talk to the database directly. I don't really like the fact that we have to create workarounds like this when we should just update the accounts & account data using the built-in APIs and have the stream positions advanced properly.

@S7evinK S7evinK changed the title Get all account data on CompleteSync Use /admin/v1/register in create-account May 25, 2022
@genofire
Copy link
Contributor

genofire commented Jul 24, 2022

@neilalexander , i understand you position.

So we should use the same function (of creating accounts) for cmd and URL-Endpoint, without going over the Endpoint ... to prevent missing to create data in the database (for notification or something else).

@neilalexander neilalexander merged commit 48600d5 into main Aug 12, 2022
@neilalexander neilalexander deleted the s7evink/accountdata branch August 12, 2022 11:00
@McSinyx
Copy link

McSinyx commented Aug 12, 2022

How do I fix accounts created with create-account?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants