Problem on my front end login.
Hi guys. I have problems on my front end when i try login on my application. I put user and password but my page is not redirect. Can you help me ?
37 Replies
Project ID:
a297026f-2372-413d-8aa5-0af4cc4fe8bb
a297026f-2372-413d-8aa5-0af4cc4fe8bb
what tech stack is your frontend
My front end is app react
create react app?
No
is my app
Dellop for me
devellop
did your app use create react app
Yes
then why did you just say no lol
I had understood that you had asked if I was using a template application that the railway website provides. I got it wrong. But my application used the command 'create react app' in creation yes.
I'm Brazilian and some things I don't understand well. Sorry for the misunderstanding.
send your repo please
Okay one moment
GitHub
GitHub - thiagolordello/todolist_frontend
Contribute to thiagolordello/todolist_frontend development by creating an account on GitHub.
okay and do you get any errors when you would expect to be redirected
The only thing I could see was that when I press the login button, the browser's inspection shows the status 200 confirming that the request was successful. When it is wrong, the correct error message comes from my back end. But the bad thing is that it doesn't redirect to the page that has to redirect.
show me the error from the backend
The back end not have error. The error mentioned is when i test inputing password wrong
show me the error
okay
show me the path that the request was made to
okay
I can't see the route in the console anymore. I don't know why it appeared before.
okay so you want that login request to redirect you?
Yes in my code i redirect from route /tasks
/tasks/id
what does that have to do with the login endpoint, if you want the login endpoint to redirect you, then you need to send a redirect from the login endpoint
But my code already does that.
if it did, then you would be redirected
so it obviously doesn't, or is not doing it correctly
I thought that some configuration on the platform could be preventing it.
no, this would be a code issue
Okay Brody. Will debug my code locally for identify the problem.
you jsut aren't sending a redirect response from the /login endpoint
Oh my god, Thank you. I imagine make this in my file Routs in dir router
you got it solved?
Not yet
youll get it
its just some simple code issue
Okay Brody. Thanks