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

171
Vistas
auth0 Management Api NextJs not able to update metadata

Really struggling to get my head around authO management clients so I can update users information. I've created a Next.js API route for the backend but I'm not sure how to actually amend the user's data. I've followed the docs and got to the point below.

API route

The ID params I manually entered to test and my response is an empty JSON object.

The docs don't make it clear what I'm suppose to do in the update user area in.

var ManagementClient = require("auth0").ManagementClient;

export default async (req, res) => {
  var auth0 = new ManagementClient({
    domain: process.env.AUTH0_BASE_URL,
    clientId: process.env.AUTH0_CLIENT_ID,
    clientSecret: process.env.AUTH0_CLIENT_SECRET,
    scope: "read:users update:users",
  });
  var params = { id: "**************************" };
  var metadata = {
    foo: "bar",
  };

  auth0.users.updateAppMetadata(params, metadata, function (err, user) {
    if (err) {
      // Handle error.
    }

    // Updated user.
    console.log(user);
    res.status(200).json({ user });
  });
};

Error:

API resolved without sending a response for /api/authapi, this may result in stalled requests.
   SanitizedError [APIError]: getaddrinfo ENOTFOUND http
   (node:internal/process/task_queues:81:21) {
      statusCode: 'ENOTFOUND',
      requestInfo: { method: 'post', url: '***********' },
      originalError: Error: getaddrinfo ENOTFOUND http
          at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:69:26) {
        errno: -3008,
        code: 'ENOTFOUND',
        syscall: 'getaddrinfo',
        hostname: 'http',
        response: undefined
      }
    }
about 4 years ago · Juan Pablo Isaza
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