Jwt.verify hangs with a token (from another system)

I’ve got code like so:

async function isTokenValid(token) {
  if (token) {
    const bearerToken = token.split(' ');

    const result = new Promise((resolve, reject) => {
      console.log('hi there');

      jwt.verify(
        bearerToken[1],
        getKey,
        {
          audience: process.env.API_IDENTIFIER,
          issuer: `https://${process.env.AUTH0_DOMAIN}/`,
          algorithms: ['RS256'],
        },
        (error, decoded) => {
          console.log('hi there 3');

          if (error) {
            console.log('hi there 2');
            resolve({ error });
          }
          if (decoded) {
            resolve({ decoded });
          }
        },
      );
    });

    return result;
  }

  return { error: 'No token provided' };
}

When I pass in a token from auth0 it validates right away. If I pass in some made up thing it fails immediately, if I give it a valid token from another system it hangs.

Here’s the other method:

function getKey(header, callback) {
  client.getSigningKey(header.kid, function (error, key) {
    const signingKey = key.publicKey || key.rsaPublicKey;

    callback(null, signingKey);
  });
}