-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: possibility to desactivate sign up
- Loading branch information
Showing
11 changed files
with
74 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,9 @@ NEXTAUTH_URL=http://localhost:3000 | |
NEXTAUTH_SECRET=PGJwbCE+WiJILGZ+K1ZqU24mIX5tVH0= | ||
GITHUB_CLIENT_ID=secret | ||
GITHUB_CLIENT_SECRET=secret | ||
AUTH_ADMIN_EMAIL=secret | ||
AUTH_ADMIN_PASSWORD=secret | ||
NEXT_PUBLIC_IS_DEMO=false | ||
AUTH_ADMIN_EMAIL=[email protected] | ||
AUTH_ADMIN_PASSWORD=Azerty123! | ||
NEXT_PUBLIC_IS_DEMO=true | ||
NEXT_PUBLIC_DEMO_EMAIL=[email protected] | ||
NEXT_PUBLIC_DEMO_PASSWORD=Azerty123! | ||
REDIS_HOST=localhost | ||
|
@@ -32,4 +32,5 @@ NEXT_PUBLIC_AWS_BUCKET_NAME=secret | |
AWS_ACCESS_KEY_ID=secret | ||
AWS_SECRET_ACCESS_KEY=secret | ||
NEXT_PUBLIC_AWS_ENDPOINT=secret | ||
ENABLE_S3_SERVICE=false | ||
ENABLE_S3_SERVICE=false | ||
ENABLE_REGISTRATION=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
import { Metadata } from "next" | ||
import { redirect } from "next/navigation" | ||
import { authRoutes } from "@/lib/auth/constants" | ||
import { env } from "env.mjs" | ||
|
||
export const metadata: Metadata = { | ||
title: "Sign-up", | ||
description: "Create an account", | ||
} | ||
|
||
export default function SignupLayout({ children }: { children: React.ReactNode }) { | ||
if (!env.ENABLE_REGISTRATION) { | ||
redirect(authRoutes.signIn[0]) | ||
} | ||
return <>{children}</> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,7 +111,8 @@ | |
"emailServiceDisabled": "Email service disabled.", | ||
"unavailableWithOAuth": "This feature is not available with OAuth providers.", | ||
"s3ServiceDisabled": "S3 service disabled.", | ||
"noFileSelected": "No file selected." | ||
"noFileSelected": "No file selected.", | ||
"registrationDisabled": "Registration disabled." | ||
}, | ||
"email": "Email", | ||
"emailPlaceholder": "[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,7 +111,8 @@ | |
"emailServiceDisabled": "Le service d'email est désactivé.", | ||
"unavailableWithOAuth": "Cette fonctionnalité n'est pas disponible avec ce type de connexion.", | ||
"s3ServiceDisabled": "Le service S3 est désactivé.", | ||
"noFileSelected": "Aucun fichier sélectionné." | ||
"noFileSelected": "Aucun fichier sélectionné.", | ||
"registrationDisabled": "L'inscription est désactivée." | ||
}, | ||
"email": "Email", | ||
"emailPlaceholder": "[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters