Skip to content

Latest commit

 

History

History
74 lines (57 loc) · 1.4 KB

File metadata and controls

74 lines (57 loc) · 1.4 KB

Login Fix Guide

🚀 Quick Start

Step 1: Fix the Admin Password Issue

Run this PowerShell command from the project root:

.\fix-login.ps1

This will:

  • Kill any running Node processes
  • Re-seed the database with correct password hashing
  • Prepare everything for login

Step 2: Start the Backend

Open a new PowerShell window and run:

cd .\server
npm run dev

You should see:

API running on 5000

Step 3: Start the Frontend

Open another PowerShell window and run:

npm run dev

You should see:

Local: http://localhost:5173

Step 4: Login

  1. Open http://localhost:5173 in your browser
  2. Click "Sign In"
  3. Enter credentials:
    • Email: admin@jobternify.com
    • Password: admin123
  4. Click "Sign in"

🔍 Troubleshooting

Login says "Invalid credentials"

# Reset the admin password
cd .\server
node src/resetPassword.js

Can't connect to backend

  • Make sure backend is running on Terminal 1
  • Check backend shows "API running on 5000"
  • Check browser console (F12 → Console) for CORS errors

Frontend won't load

  • Make sure frontend is running on Terminal 2
  • Try http://localhost:5173 (not localhost:3000)
  • Clear browser cache (Ctrl+Shift+Delete)

Database connection error

  • Check .env has correct MONGO_URI
  • Verify MongoDB is running
  • Check connection string is valid