Thank you very much Femi for your cooperation in analyzing this issue.
After having fixed a bug in the demo source code on a logging instruction, and tried to establish a session with IG by using similar JavaScript code, we have concluded that something unexpected is happing to your account.
In fact, the negative code error sent back by the server (
-2) indicates that the specific Metadata Adapter implementation has refused the user connection, as you can see from the
documentation.
Please let us know if your issue will be resolved.
Thanks and Regards,
Gianluca