Open DillonMercz opened 1 year ago
{ host: 'localhost:8080', connection: 'keep-alive', 'cache-control': 'max-age=0', 'sec-ch-ua': '"Google Chrome";v="113", "Chromium";v="113", "Not-A.Brand";v="24"', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"macOS"', 'upgrade-insecure-requests': '1', 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36', accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7', 'sec-fetch-site': 'none', 'sec-fetch-mode': 'navigate', 'sec-fetch-user': '?1', 'sec-fetch-dest': 'document', 'accept-encoding': 'gzip, deflate, br', 'accept-language': 'en-US,en;q=0.9' } /Downloads/chat/server/middlewares/VerifyToken.js:6 const token = req.headers.authorization.split(" ")[1]; ^
TypeError: Cannot read properties of undefined (reading 'split')
Please checkout the Getting Started section of the README. thanks.
i am also facing the same issue i used the errorhandler like this also if (!token) { return res.json({ message: "Access Denied" }); }
but now its showing me unable to login and unable to register on the frontend
Interesting
just enale the authentication in your firebase console it will work
Could you provide the instructions to get this code running? I feel there is a lot of blanks and I can't figure out how to run it. Thank you.