Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

247
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda