I'm not sure how to properly do JWT authentication on the front end, I didn't have almost any problems on the back end though.
with Javascript I didn't get too far past this snippet as I had to redo stuff many times and it didn't work anyway
const submit = async (e) => {
e.preventDefault();
await axios('http://localhost:8080/api/login', {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
credentials: 'include',
data:new URLSearchParams(`username=${username}&password=${password}`)
});
}
Which basically just displays the access&refresh tokens in the network info of the page.
how do I actually identify the user on a website from there on and actually be able to use the user's own data, such as files for example?
I need to just be able to identify the user, all their data, such profile-info, photos etc... and the user to only be able to access its own data