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

M_INVALID_PARAM "Invalid login submission" error when trying to use m.login.registration_token #11948

Closed
Half-Shot opened this issue Feb 9, 2022 · 1 comment

Comments

@Half-Shot
Copy link
Collaborator

I'm sending a request via curl:

curl --data '{}' 'http://localhost:8008/_matrix/client/v3/register'
...
curl --data '{"password": "password", "auth": { "type": "m.login.registration_token", "token": "hBYSAPs-RSr7ITNk", "session": "nZHgKJUTRaiyPojuVKQUOWhB" }}' 'http://localhost:8008/_matrix/client/v3/register'

Which causes an error of M_INVALID_PARAM.

which is only raised in

if not identifier:
raise SynapseError(400, "Invalid login submission", Codes.INVALID_PARAM)
.

I have also tried including a username, but that also gives the same error, as does providing a identifier key.

According to the spec, the key isn't even mandatory:

The basis for the localpart of the desired Matrix ID. If omitted, the homeserver MUST generate a Matrix ID local part.

This is on Synapse 1.52.0

@Half-Shot
Copy link
Collaborator Author

Half-Shot commented Feb 9, 2022

This was probably due to #11949, it's a bit of a shame we don't immediately error on a bad auth.type.

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

No branches or pull requests

1 participant