AFFiNE
AFFiNE copied to clipboard
Self-hosted: add config for turn off signup feature
What happened?
Wanted to host a test version and close down the signup so users are not accidently signing up to my "private" test system.
Installed Docker Image with supplied docker-compose. Setup all great and easy. Now I tried to deactivate Signups.
1st bug:
Found an existing ENV and set OAUTH_GOOGLE_ENABLED=false
--> but that is not working. Button is still displayed.
2nd bug:
Email signup. No direct ENV. After digging I found in dist/fundamentals/config/default.js
-> defaultConfig
a flag in auth.enableSignup
--> BINGO!
Now I wanted to set it:
1st try: in my mapped config folder (corresponds to /root/.affine/config
) in affine.js
I added:
AFFiNE.auth.enableSignup = false;
AFFiNE.auth.enableOauth = false;
without effect. :(
Then I tried another "hacky" way
I edited affine.env.js
and added based on the logic of the Google / Github variables there:
SIGNUP_ENABLED: ['auth.enableSignup', 'boolean'],`
and in my otherwise working .env
file:
OAUTH_GOOGLE_ENABLED=false
SIGNUP_ENABLED=false
... also not working :(
So I report this as a "bug" since the functionality seems to be there, but is NOT working.
Distribution version
Web (app.affine.pro)
What browsers are you seeing the problem on if you're using web version?
Chrome
Are you self-hosting?
- [X] Yes
Relevant log output
No response
Anything else?
No response
Issue Status: 🔍 Under Investigation
🔍 Under Investigation
We’ve triaged the issue, but now we need to investigate it more thoroughly. This may require processing additional information like logs or dumps.
This is an automatic reply by the bot.
we have refactoring related components in the last two major versions, and the corresponding env var are outdated.
please go to our docs to view the latest available env vars: https://docs.affine.pro/docs/self-host-affine/run-affine-with-custom-options
specifically, in the latest version, as long as the OAUTH_* env are not defined, the oauth feature will be turned off, but there is currently no config item that can turn off the registration feature.
i have recorded the config item of turn off the registration feature in the development schedule, once there are relevant updates, i will associate it with this issue.
Why the close? I thought this was planned?
done already actually. wait for the release of 0.15
Hello, do we already have this feature? I am trying to disable user sign up, and just allow admin to send email. Can we make this reachable?
I've just pulled 0.15.7 and it seems this issue still exists?
I'm on 0.16, did you add the possibility of closed signup or invite-only signup? I can't find anything about this in the custom options.
I'm on 0.16, did you add the possibility of closed signup or invite-only signup? I can't find anything about this in the custom options.
goto /admin/settings and turn of "Whether allow new registrations"
I'm on 0.16, did you add the possibility of closed signup or invite-only signup? I can't find anything about this in the custom options.
goto /admin/settings and turn of "Whether allow new registrations"
I've been seeing comments across issues and the forums mention this admin panel but had no idea how to get to it, THANK YOU!