Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

241
Views
Vuejs, JTW Token From Registration Email

Hi guys i need help with JTW token. i do registration form with vuejs and i send data to database with axios. I need to save the token I receive on the confirmation email and send the STATE and TOKEN on the validateRegister API to complete the registration. I'm very awkward it's the first time I use 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);
        }
    }
}

This is the link i receive on the email enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Olá, você precisará adicionar um header a requisição do axios, dessa forma:

const headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer fefege...'
}

//Dados
const data = {...}

const response = await axios.post('api/users/register', data, {
    headers: headers
})...
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!