Skip to content

[Bug] Login/Signup fails in production due to missing VITE_BACKEND_URL #410

Description

@vv-verse

Description

Authentication is currently broken on the deployed website.

Signup and login requests fail with:

POST https://github-spy.netlify.app/undefined/api/auth/signup
404 (Not Found)

Users only see a generic "Something went wrong" message on the frontend.


Steps to Reproduce

  1. Visit https://github-spy.netlify.app/signup
  2. Fill the signup form
  3. Submit the form
  4. Open DevTools → Console tab

Root Cause

VITE_BACKEND_URL is not configured in the Netlify deployment environment.

Both auth pages currently use:

const backendUrl = import.meta.env.VITE_BACKEND_URL;

When the variable is missing, the generated request URL becomes:

undefined/api/auth/signup

Action Required

Configure the following environment variable in the Netlify deployment settings:

VITE_BACKEND_URL=<deployed_backend_url>

Additional Context

A related PR has been prepared which:

  • adds frontend and backend .env.example files
  • improves local environment setup guidance
  • adds safer fallback handling for missing env variables

Screenshot

Image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions