Auth breaks inside useMutation

I am implementing a widget from a payment provider (Wompi), that takes a callback on success. In that callback, I am calling a mutation (from useMutation). For some reason, when called like this, it excludes the “authorization” header, and I get Exception in getAuthenticationContext: The Authorization header is not valid. . The same mutation works fine if I call it in a useEffect (just to test this). Does anyone know why this might be happening?