Closed thedanbob closed 5 years ago
Since this is a more niche use case, It would probably be better if we make it possible and document it somewhere, instead of trying to magically enable it all with a single variable.
Looks like configuring registrations_require_3pid
is not possible at the moment.
We can introduce a new matrix_synapse_registrations_require_3pid
variable for that.
Fair enough. That one change would make it much nicer than having to copy the whole homeserver.yaml.j2 just for two lines.
Sure!
If you'd like to work on it, please go ahead. If not, I will probably get to it at some point.
I'll open a pull request in a moment for the new homeserver.yaml option. I'll see about adding the nginx config block later as well.
Update 26.01.2021: Use the code one comment below
An update for everybody that is searching for a solution. Use this code now:
matrix_nginx_proxy_proxy_matrix_additional_server_configuration_blocks:
- |
location /_matrix/client/r0/register/email/requestToken {
resolver 127.0.0.11 valid=5s;
proxy_pass http://matrix-ma1sd:8090;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
Another update:
matrix_nginx_proxy_proxy_matrix_additional_server_configuration_blocks:
- |
location /_matrix/client/r0/register/email/requestToken {
resolver 127.0.0.11 valid=5s;
set $backend "matrix-ma1sd:8090";
proxy_pass http://$backend;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
mxisd has the ability to restrict registrations to only users invited by email. Described here: https://github.com/kamax-matrix/mxisd/blob/master/docs/features/registration.md This config was enough to get it working:
It would be nice to enable it with a single flag like the user_directory_search feature.