go-sync icon indicating copy to clipboard operation
go-sync copied to clipboard

Option to disallow new users?

Open brevilo opened this issue 9 months ago • 2 comments

Hi,

I'd like to disallow the "sign up" of new users, while the addition of new devices for existing users should remain allowed. Looking at the code I figured that the equivalent of a user is probably called a "client" and the equivalent of a device is a "sync entity", correct?

Where would be the best place to cancel a new "sign up"? Assuming the above terminology is correct, one idea would be here which is run for each new client and at that point without having found any nigori details for the clientID, so I'd just return an error there. Any better approach?

I reckon this could be a useful feature for almost all decentral sync server instances. Would it be feasible to make this an "official" feature, e.g. controlled by an environment variable?

Thanks!

brevilo avatar Mar 08 '25 21:03 brevilo

cc @fmarier

diracdeltas avatar Mar 17 '25 19:03 diracdeltas

I'm not familiar enough with the code to be able to guide you, but it does sound like a reasonable feature to add behind an envvar.

fmarier avatar Mar 17 '25 20:03 fmarier

Kindly asking @yrliou for advice as the original author of the code referenced above.

brevilo avatar Apr 02 '25 21:04 brevilo