Skip to content

Commit

Permalink
Update environment configuration and enhance password validation in a…
Browse files Browse the repository at this point in the history
…uthentication forms
  • Loading branch information
gkhaavik committed Dec 1, 2024
1 parent 49217b1 commit 56160f4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
20 changes: 13 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
NEXT_PUBLIC_COMMERCIFY_API_URL=http://localhost:8080/api/v1
NODE_ENV=development

# MySQL Configuration
MYSQL_ROOT_PASSWORD=Password1234!
MYSQL_USER=commercify
MYSQL_PASSWORD=c0mmercifypassw0rd123!
NEXT_PUBLIC_COMMERCIFY_API_URL=https://domain.com:6091/api/v1
NEXT_PUBLIC_DEV_COMMERCIFY_API_URL=http://localhost:6091/api/v1
SMTP_HOST=smtp.ethereal.email
SMTP_PORT=587
SMTP_USER=
SMTP_PASSWORD=
EMAIL_DEV=[email protected]

# Spring Boot Application Configuration
SPRING_DATASOURCE_URL=jdbc:mysql://mysql-db:3306/commercifydb
# Backend Configuration
# use "host.docker.internal" as host if you are connecting to a MySQL database running on the host machine
SPRING_DATASOURCE_URL=jdbc:mysql://localhost:3306/commercifydb?createDatabaseIfNotExist=true
SPRING_DATASOURCE_USERNAME=root
SPRING_DATASOURCE_PASSWORD=Password1234!
STRIPE_TEST_SECRET=sk_test_
STRIPE_SECRET_WEBHOOK=whsec_
STRIPE_WEBHOOK_ENDPOINT=we_
JWT_SECRET_KEY=7581e8477a88733917bc3b48f683a876935a492a0bd976a59429a2f28c71fde
ADMIN_EMAIL=[email protected]
ADMIN_PASSWORD=commercifyadmin123! # min 8 characters
4 changes: 2 additions & 2 deletions src/components/authentication/AuthForms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { Checkbox } from '@/components/ui/checkbox';

const registerSchema = z.object({
email: z.string().email(),
password: z.string().min(2).optional(),
password: z.string().min(8).optional(),
firstName: z.string().min(2),
lastName: z.string().min(2),
isGuest: z.boolean().default(false),
Expand All @@ -35,7 +35,7 @@ const registerSchema = z.object({

const loginSchema = z.object({
email: z.string().email(),
password: z.string().min(2),
password: z.string().min(8),
rememberMe: z.boolean().default(false),
});

Expand Down

0 comments on commit 56160f4

Please sign in to comment.