Hey everyone, I could really use some assistance with JWT tokens. I created a registration form using Vue.js and sent the data to the database using axios. Now, I need help figuring out how to save the token I receive in the confirmation email so that I can send the STATE and TOKEN to the validateRegister API to complete the registration process. This is all new to me as it's my first time working with Vue and axios.
import axios from 'axios'
export default {
name: 'Register',
data() {
return {
email: '',
password: '',
name: '',
surname: '',
data: '',
telefono: '',
risiedi: '',
cap: '',
provincia: '',
citta: '',
privacy: false
}
},
methods: {
async handleSubmit() {
const response = await axios.post('api/users/register',{
email: this.email,
password: this.password,
name: this.name,
surname: this.surname,
});
console.log(response);
}
}
}
Here's the link that was included in the email https://i.sstatic.net/a7ohK.png