env variable

This commit is contained in:
Max Peintner
2024-12-19 09:08:18 +01:00
parent 6cd0e7cb18
commit ab03996297
3 changed files with 7 additions and 5 deletions

View File

@@ -1,3 +1,3 @@
ZITADEL_API_URL=http://localhost:22222
CACHE_REVALIDATION_INTERVAL_IN_SECONDS=3600
EMAIL_VERIFICATION=true
DEBUG=true

View File

@@ -175,9 +175,11 @@ export async function sendPassword(command: UpdateSessionCommand) {
return { error: "Initial User not supported" };
}
// TODO add check to see if user was verified
if (!humanUser?.email?.isVerified) {
// add check to see if user was verified
if (
!humanUser?.email?.isVerified &&
process.env.EMAIL_VERIFICATION === "true"
) {
const params = new URLSearchParams({
loginName: session.factors?.user?.loginName as string,
});