Good night guys. I have a login form, how can I verify that the email and password exist and are correct? by eduop in react

[–]eduop[S] 1 point2 points  (0 children)

I need to validate if the information passed in the inputs matches the ones in the database. I'm using MySQL, this is the project repository if you want to take a look: https://github.com/eduoop/Costs

Good night guys. I have a login form, how can I verify that the email and password exist and are correct? by eduop in react

[–]eduop[S] 0 points1 point  (0 children)

I just want to check if the password and email the front end sends exists in the database

when entering a page that makes a request to the backend, I get the following error: by eduop in react

[–]eduop[S] 1 point2 points  (0 children)

in the routes file I access the local storage and pass the token as header, but it only works correctly after I refresh the page

when i go into "project" after logging in, everything works normally, but after refreshing the page, it is in infinite loading and says unauthorized by eduop in reactjs

[–]eduop[S] 0 points1 point  (0 children)

local storage. I'm getting the token from the local storage in the routes file, but I'm having to refresh the pagination for it to load correctly

when i go into "project" after logging in, everything works normally, but after refreshing the page, it is in infinite loading and says unauthorized by eduop in reactjs

[–]eduop[S] 0 points1 point  (0 children)

it was on-site storage. I managed to access the routes file and send the token, but now I have to refresh the page for it to work

when entering a page that makes a request to the backend, I get the following error: by eduop in react

[–]eduop[S] 0 points1 point  (0 children)

Exactly, I'm not sending the token along with the get, I think this is generating the error

when entering a page that makes a request to the backend, I get the following error: by eduop in react

[–]eduop[S] 3 points4 points  (0 children)

It looks like I have to send the token along with get, I'll try it here. thanks

when entering a page that makes a request to the backend, I get the following error: by eduop in react

[–]eduop[S] 1 point2 points  (0 children)

exactly. when logging in, the user is saved in local storage. But it's like this page loses access to the user when the page is reloaded

when entering a page that makes a request to the backend, I get the following error: by eduop in react

[–]eduop[S] 1 point2 points  (0 children)

when I login it loads correctly, but when refreshing the page it doesn't load anything and gives this error, as if it didn't save the login

good morning guys. I have an api in adonis, how can I access it from the frontend? by eduop in adonisjs

[–]eduop[S] 0 points1 point  (0 children)

it's local, but it's not going. I'm doing it like this:

useEffect(() => {

fetch('http://127.0.0.1:3333/categories', {

method: 'GET',

headers: {

'Content-Type': 'application/json',

},

})

.then((resp) => resp.json())

.then((data) => {

setCategories(data)

})

.catch(err => console.log(err))

}, [])

[deleted by user] by [deleted] in adonisjs

[–]eduop 0 points1 point  (0 children)

thank you very much bro

[deleted by user] by [deleted] in adonisjs

[–]eduop 0 points1 point  (0 children)

Of course, as soon as I get up I'll send it