From 938354b8b4d07be66e6eb0cd41ec9bcd088fbec4 Mon Sep 17 00:00:00 2001 From: "DeepBlueV7.X" Date: Thu, 4 Nov 2021 13:03:53 +0100 Subject: [PATCH] Rename threepidCreds to threepid_creds and get rid of array (#3471) This fixes the behaviour to match what synapse implements in practice. If you use threepidCreds, you will just get an error about a missing threepid_creds field. Synapse also treats this as an object. All clients also seem to send threepid_creds, if they work on Synapse. Since matrix.org requires an email currently for registration, most clients that implement registration, will hit this issue. https://github.com/matrix-org/synapse/blob/a0f48ee89d88fd7b6da8023dbba607a69073152e/synapse/handlers/ui_auth/checkers.py#L145 fixes #3156 fixes #2189 Signed-off-by: Nicolas Werner --- .../newsfragments/3471.clarification | 1 + content/client-server-api/_index.md | 28 ++++++++----------- 2 files changed, 13 insertions(+), 16 deletions(-) create mode 100644 changelogs/client_server/newsfragments/3471.clarification diff --git a/changelogs/client_server/newsfragments/3471.clarification b/changelogs/client_server/newsfragments/3471.clarification new file mode 100644 index 00000000..b106e3c5 --- /dev/null +++ b/changelogs/client_server/newsfragments/3471.clarification @@ -0,0 +1 @@ +Fix documentation errors around `threepid_creds`. diff --git a/content/client-server-api/_index.md b/content/client-server-api/_index.md index 43b87250..4ef14de6 100644 --- a/content/client-server-api/_index.md +++ b/content/client-server-api/_index.md @@ -719,14 +719,12 @@ follows: ```json { "type": "m.login.email.identity", - "threepidCreds": [ - { - "sid": "", - "client_secret": "", - "id_server": "", - "id_access_token": "" - } - ], + "threepid_creds": { + "sid": "", + "client_secret": "", + "id_server": "", + "id_access_token": "" + }, "session": "" } ``` @@ -750,14 +748,12 @@ follows: ```json { "type": "m.login.msisdn", - "threepidCreds": [ - { - "sid": "", - "client_secret": "", - "id_server": "", - "id_access_token": "" - } - ], + "threepid_creds": { + "sid": "", + "client_secret": "", + "id_server": "", + "id_access_token": "" + }, "session": "" } ```