postiz-app icon indicating copy to clipboard operation
postiz-app copied to clipboard

Disable User Regsitration

Open Felitendo opened this issue 1 year ago • 5 comments

🔖 Feature description

Please add an ENV-Variable called "USER_REGISTRATION" that we can set to "false" to disable new users from creating accounts

🎤 Why is this feature needed ?

Public Instances can be abused without this feature

✌️ How do you aim to achieve this?

Add an ENV-Variable called "USER_REGISTRATION" that we can set to "false" to disable new users from creating accounts

🔄️ Additional Information

No response

👀 Have you spent some time to check if this feature request has been raised before?

  • [X] I checked and didn't find similar issue

Are you willing to submit PR?

None

Felitendo avatar Dec 09 '24 12:12 Felitendo

@nevo-david I can handle that if you want.

caushcani avatar Dec 09 '24 16:12 caushcani

@nevo-david I can handle that if you want.

That would be great!

Felitendo avatar Dec 10 '24 06:12 Felitendo

For the time being: I'm using this in my NGINX reverse proxy config, maybe it can be of help for someone: # Redirect /auth/ to /auth/login location = /auth/ { return 301 https://subdomain.domain.com/auth/login; } location = /auth { return 301 https://subdomain.domain.com/auth/login; }

# Block /api/auth/register
location = /api/auth/register {
    return 403;
}
location = /api/auth/register/ {
    return 403;
}

dib0 avatar Jan 01 '25 13:01 dib0

I prefer to take this kind direction. https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/

nevo-david avatar Jan 05 '25 14:01 nevo-david

👋 @nevo-david

x-posting for the folks watching this issue

image

justsml avatar Jan 06 '25 15:01 justsml

Is there any change that for time being we can just add simple DOCKER env variable that indicate registration is disabled ?

kkalisz avatar Jan 28 '25 19:01 kkalisz

Has been implemented.

egelhaus avatar Jan 31 '25 21:01 egelhaus

@egelhaus is it implemented as proposed (Please add an ENV-Variable called "USER_REGISTRATION" that we can set to "false" to disable new users from creating accounts)? Thanks in advance.

apowell656 avatar Feb 03 '25 15:02 apowell656

I'm having trouble with this one. After disabling the registration, I cannot use Google SSO for login.

BohdanK-W32 avatar Apr 02 '25 15:04 BohdanK-W32

I'm having trouble with this one. After disabling the registration, I cannot use Google SSO for login.

Yes, as Google SSO would be for production use, and Zhe feature is only for development / testing purposes, it can be used for production, but them you won't have SSO.

egelhaus avatar Apr 02 '25 16:04 egelhaus