node-js-express-login-example icon indicating copy to clipboard operation
node-js-express-login-example copied to clipboard

Thank you very much for this project,Im fresh on nodejs

Open est7 opened this issue 2 years ago • 7 comments

could you please tell me what else do I need to edit in the project,in my develope env signin api return info json ,but does not return a token, much appreciated!

est7 avatar Jan 18 '23 04:01 est7

I am also confused on this part as he hasn't sent the jwt token back to the client.

shrey1605 avatar Feb 22 '24 21:02 shrey1605

Im confused too can someone help me? In client where do I put the jwt token in axios request to my server?

notbeer avatar May 30 '24 01:05 notbeer

Read the docs

trasherdk avatar May 30 '24 14:05 trasherdk

Its confusing because in the post/signin. Its not sending no token back to the user but instead its sets the token to "req.session.token". But at middleware verifyToken req.session is empty {} so there is no token for me to get. For some reason

notbeer avatar May 31 '24 04:05 notbeer

Okay so I understand the whole concept now but heres to problem. GET /user/* all of the endpoints work on postman when i request the api there but on my react client it doesnt work. GET /user withCredentials true on axios returns no token provided (403)

notbeer avatar Jun 01 '24 04:06 notbeer

And you are setting a Authorization: Bearer .... header?

trasherdk avatar Jun 01 '24 06:06 trasherdk

But POST /auth/signin doesn't send any jwt token it only sets to req.session.token

notbeer avatar Jun 01 '24 14:06 notbeer