Skip to content

fix: resolve CORS config and login form field mismatch#52

Merged
rdodiya merged 4 commits into
rdodiya:gssoc_developfrom
abhigyan24-ops:fix/login-cors-and-form
May 16, 2026
Merged

fix: resolve CORS config and login form field mismatch#52
rdodiya merged 4 commits into
rdodiya:gssoc_developfrom
abhigyan24-ops:fix/login-cors-and-form

Conversation

@abhigyan24-ops
Copy link
Copy Markdown
Contributor

Fixes #31

What changed

1. CORS Configuration

Added localhost origins to application-dev.properties:

2. Login Form Fix

Fixed field mismatch in Login.jsx:

  • initialValues was using email but input field and validation schema used username
  • Fixed error display from formik.touched.email to formik.touched.username

Result

Login is now fully functional locally with test credentials:

  • Username: admin / Password: admin123
  • Username: restaurant_owner / Password: owner123

Testing

  1. Start backend with gradle bootRun
  2. Start frontend with npm run dev
  3. Go to /login
  4. Enter credentials above
  5. Login succeeds and redirects to dashboard

@rdodiya
Copy link
Copy Markdown
Owner

rdodiya commented May 13, 2026

Hi @abhigyan24-ops ,
Please resolve conflicts, revert defaultdata.js(not required) and replace RestroHub with Restorly as the product is Restorly.

@abhigyan24-ops
Copy link
Copy Markdown
Contributor Author

Hi @rdodiya, resolved the merge conflicts, reverted defaultData.js, and kept the CORS fix. Branch is now up to date with gssoc_develop.

@rdodiya
Copy link
Copy Markdown
Owner

rdodiya commented May 14, 2026

Hi @abhigyan24-ops ,
Please remove unnecessary changes of properties files and logs file

image

I think only the below change is required
security.cors.allowed-origins=http://localhost:5173,http://localhost:3000,http://localhost:3002

Please remove extra changes done in Landing Page as this doesn't related to CORS issue
image

image

We will be using email but for now this changes is done in #50
So please revert this also

image

@abhigyan24-ops
Copy link
Copy Markdown
Contributor Author

Hi @rdodiya, I've addressed all the requested changes:

Kept only the CORS security.cors.allowed-origins line in application-dev.properties
Removed application-dev.properties.example
Reverted Login.jsx (will be handled in #50)
Reverted all unrelated changes in Landing.jsx, Navigation.jsx, index.html, Java entity files, log and gradle files

Please review when you get a chance

@rdodiya rdodiya merged commit 2c9acb9 into rdodiya:gssoc_develop May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Login, Signup and Get Started buttons non-functional

2 participants