📧 feat: disable login (ALLOW_EMAIL_LOGIN) (#1282)

* added ALLOW_EMAIL_LOGIN

* update .env.example

* fix(config) email login true by default

* Update dotenv.md
This commit is contained in:
Marco Beretta 2023-12-06 13:08:49 +01:00 committed by GitHub
parent 1706886a64
commit fdb65366d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 14 additions and 3 deletions

View file

@ -34,7 +34,7 @@ function Login() {
{localize(getLoginError(error))}
</div>
)}
<LoginForm onSubmit={login} />
{startupConfig?.emailLoginEnabled && <LoginForm onSubmit={login} />}
{startupConfig?.registrationEnabled && (
<p className="my-4 text-center text-sm font-light text-gray-700">
{' '}
@ -44,7 +44,7 @@ function Login() {
</a>
</p>
)}
{startupConfig?.socialLoginEnabled && (
{startupConfig?.socialLoginEnabled && startupConfig?.emailLoginEnabled && (
<>
<div className="relative mt-6 flex w-full items-center justify-center border border-t uppercase">
<div className="absolute bg-white px-3 text-xs">Or</div>

View file

@ -39,6 +39,7 @@ const setup = ({
githubLoginEnabled: true,
discordLoginEnabled: true,
registrationEnabled: true,
emailLoginEnabled: true,
socialLoginEnabled: true,
serverDomain: 'mock-server',
},

View file

@ -39,6 +39,7 @@ const setup = ({
openidImageUrl: 'http://test-server.com',
githubLoginEnabled: true,
discordLoginEnabled: true,
emailLoginEnabled: true,
registrationEnabled: true,
socialLoginEnabled: true,
serverDomain: 'mock-server',