-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Synapse support username availability check #3605
Comments
sounds great to me. i'd expect the auth stuff would give us an API we could already prod for this... |
Not quite true. We'll have to write a simple API for Synapse that does a The API could look like GET /_matrix/.../register/available
{
"username" : "mylovelyusername"
} Available looks like: HTTP/1.1 200 OK
{
"available" : true
} Unavailable looks like HTTP/1.1 400
User ID already taken This would require modifying Rate limiting would have to be quite heavy so as to prevent people iterating over mxids. |
Jumped to conclusions about the purpose of the API. Ignore me :) |
To what extent do we want to stop people from being able to iterate over lists of mxids? We probably want to have quite aggressive ratelimiting on the endpoint at least. |
Yep, it would be heavily rate-limited, I forgot to mention that. |
Outlined here: element-hq/element-web#3605 (comment) ```HTTP GET /_matrix/.../register/available { "username": "desiredlocalpart123" } ``` If available, the response looks like ```HTTP HTTP/1.1 200 OK { "available": true } ``` Otherwise, ```HTTP HTTP/1.1 429 { "errcode": "M_LIMIT_EXCEEDED", "error": "Too Many Requests", "retry_after_ms": 2000 } ``` or ```HTTP HTTP/1.1 400 { "errcode": "M_USER_IN_USE", "error": "User ID already taken." } ``` or ```HTTP HTTP/1.1 400 { "errcode": "M_INVALID_USERNAME", "error": "Some reason for username being invalid" } ```
The details of the new guest experience for Riot are on the project plan: element-hq/riot-meta#59
I believe there are design decision reasons why this hasn't been implemented in the past. I'd like us to consider this because picking an available username is particularly tedious if checking availability isn't as painless as possible.
The scope of this task would be to deliver an API in Synapse that can be called to check username availability.
@ara4n - what are your thoughts on this existing?
The text was updated successfully, but these errors were encountered: