Your deployed backend at https://api.nirveonx.com is using old code that redirects instead of returning JSON. The app will fail.
cd /Users/sairithwikbejadi/Desktop/NirveonX/N-Backend
# Add the fixed authRouter.js
git add router/authRouter.js
git add app.js
# Commit
git commit -m "Fix auth to return JSON instead of redirects"
# Push to trigger Render deployment
git push origin mainRender will auto-deploy in 2-3 minutes.
- Go to https://dashboard.render.com
- Find "N-Backend" service
- Click Manual Deploy → Deploy latest commit
- Wait 2-3 minutes for deployment
Your local N-Backend/router/authRouter.js has the correct JSON auth:
router.post("/login", (req, res, next) => {
passport.authenticate("local", (err, user, info) => {
if (!user) {
return res
.status(401)
.json({ message: info?.message || "Invalid credentials" });
}
// ... returns JSON
})(req, res, next);
});But deployed backend still has old redirect code.
After deploying, test:
curl -X POST https://api.nirveonx.com/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"test","password":"test"}'Should return JSON like:
{ "message": "Invalid credentials" }NOT a redirect!
The MCP servers (chatbot) also need to be deployed if you want chat to work in production APK.
For now, auth is the priority!