my backend code is connected to a database and the register password hashes and everything works fine on the backend. im struggling with my connection from react to express now with axios, everything works in frontend properly except the password doesnt hash in react(i see in the console).
please see attached images:
this is react files:
From your question, I assume you trying to say that whenever you make request to server from react using axios, the server receives the data and process the data(hashing pass) and then save it into mongodb.
But when you send back user details from server to react , u console the response then you see the unhashed instead of hashed password in response.
Right ?
If yes, then I think you are just sending wrong response from route.
something probably in your post register route.
Would you mind sharing your console.log as well as route code ?
when i click register in react browser,i see in my console log theres no errors , react is displaying name+surname+email but it is not hashing my password.
“”“But when you send back user details from server to react , u console the response then you see the unhashed instead of hashed password in response.
Right ?”“”
i dont think i connected react to express properly so i wouldnt be able to send from server to react. my backend code is working fine i tested it using insomnia, in insomnia the password is hashed if i run my backend code.
hope this helps.
let me know if i have to send more specific images of my code, as i sent you the main codes for the task already