Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

use only the first four charecters in AUTH_SECRET

Sara Vieira494244aa7efb
diff --git a/apps/designer/app/services/auth.server.ts b/apps/designer/app/services/auth.server.ts
index 05c08e740d..0e07fe3d77 100644
--- a/apps/designer/app/services/auth.server.ts
+++ b/apps/designer/app/services/auth.server.ts
@@ -55,7 +55,7 @@ if (process.env.DEV_LOGIN === "true") {
new FormStrategy(async ({ form }) => {
const secret = form.get("secret");
- if (secret === process.env.AUTH_SECRET) {
+ if (secret === process.env.AUTH_SECRET?.slice(0, 4)) {
try {
const user = await db.user.createOrLoginWithDev();
return user;
diff --git a/apps/designer/docs/test-cases.md b/apps/designer/docs/test-cases.md
index fb4c81f185..b991c78e17 100644
--- a/apps/designer/docs/test-cases.md
+++ b/apps/designer/docs/test-cases.md
@@ -64,7 +64,7 @@
- Open the login page when logged in to make sure you are redirected to the dashboard
- Ensure you can view a built site in an incognito tab
- Ensure you can view a forked site in an incognito tab
- - Click on dev login, add the AUTH_SECRET value in the `.env` value and make sure user is authenticated and redirected to the dashboard
+ - Click on dev login, add the first four characters in AUTH_SECRET value in the `.env` value and make sure user is authenticated and redirected to the dashboard
- Click on dev login and write a wrong value to make sure you get an error message and stay in the login page.
- Click on login with GitHub and make sure that you are redirected to the dashboard
- Click on login with Google and make sure that you are redirected to the dashboard