I am trying to develop a plugin which will connect a website using client-certificate, fetch a token and add to the request context. The node js that I have written for this works fine when executed standalone. However, from Insomnia the request is failing with an error saying net::ERR_CERT_AUTHORITY_INVALID
To Reproduce
Import the plugin folder and reload to activate.
Trigger an API request and monitor the devtools console.
Expected behavior
The token should be successfully fetched without throwing any error.
Error logs
/Users/myself/Library/Application Support/Insomnia/plugins/insomnia-plugin-ma-secure-request/node_modules/axios/lib/adapters/xhr.js:177 POST <URL> net::ERR_CERT_AUTHORITY_INVALID
Request failed Error: Network Error
at createError (VM1709 createError.js:16)
at XMLHttpRequest.handleError (VM1707 xhr.js:84)
Desktop (please complete the following information):
OS: macOS 10.15.7
Installation Method: homebrew
App Version: 2021.4.1
I have executed the code separately outside Insomnia to ensure it works.
I am trying to develop a plugin which will connect a website using client-certificate, fetch a token and add to the request context. The node js that I have written for this works fine when executed standalone. However, from Insomnia the request is failing with an error saying
net::ERR_CERT_AUTHORITY_INVALID
To Reproduce Import the plugin folder and reload to activate. Trigger an API request and monitor the devtools console.
Example Code
main.js
:package.json
:Expected behavior The token should be successfully fetched without throwing any error.
Error logs
Desktop (please complete the following information):
I have executed the code separately outside Insomnia to ensure it works.