Skip to content
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

Self-hosted: add config for turn off signup feature #6141

Closed
1 task done
chief-nerd opened this issue Mar 15, 2024 · 9 comments
Closed
1 task done

Self-hosted: add config for turn off signup feature #6141

chief-nerd opened this issue Mar 15, 2024 · 9 comments
Assignees

Comments

@chief-nerd
Copy link

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?

  • Yes

Relevant log output

No response

Anything else?

No response

@affine-issue-bot
Copy link

affine-issue-bot bot commented Mar 15, 2024

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.

@darkskygit
Copy link
Member

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.

@darkskygit darkskygit changed the title selfhosted: auth.enableSignup​ not having any effect Self-hosted: add config for turn off signup feature Mar 15, 2024
@darkskygit darkskygit moved this from 🆕 *Untriaged to 🔍 Under Investigation in AFFiNE Project Mar 15, 2024
@darkskygit darkskygit added this to the AFFiNE 0.14.0 milestone Mar 15, 2024
@toeverything toeverything deleted a comment from affine-issue-bot bot Mar 15, 2024
@darkskygit darkskygit removed this from the AFFiNE 0.14.0 milestone Mar 15, 2024
@linear linear bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 16, 2024
@chief-nerd
Copy link
Author

Why the close? I thought this was planned?

@linear linear bot reopened this Jun 16, 2024
@linear linear bot assigned forehalo and unassigned darkskygit Jun 16, 2024
@forehalo
Copy link
Member

done already actually. wait for the release of 0.15

@alissa-tung
Copy link

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?

@samwh1te
Copy link

samwh1te commented Aug 4, 2024

I've just pulled 0.15.7 and it seems this issue still exists?

@Braintelligence
Copy link

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.

@darkskygit
Copy link
Member

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"

@Bottleface
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔍 Under Investigation
Development

No branches or pull requests

7 participants