Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running the code #4

Open
DillonMercz opened this issue May 17, 2023 · 5 comments
Open

Running the code #4

DillonMercz opened this issue May 17, 2023 · 5 comments

Comments

@DillonMercz
Copy link

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.

@DillonMercz
Copy link
Author

{
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')

@earthcomfy
Copy link
Owner

Please checkout the Getting Started section of the README. thanks.

@Vivek-C-Shah
Copy link

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

@Osasdeke
Copy link

Interesting

@FTS-Dev3
Copy link

just enale the authentication in your firebase console it will work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants