TOTP POST does not respect "followAllRedirects"?
Consider this code:
const result = await this.vault.write(
'/totp/keys/[email protected]',
{
url: 'otpauth://totp/SecSys:[email protected]?issuer=SecSys&secret=somesecret',
requestOptions: {
followAllRedirects: true
}
}
);
It works as expected when performing the request from, say, Postman, but always return "Status 301" when I call it from node-vault.
I'm pretty sure that Vault initialized and running. All GET request work as usual. Maybe it's somewhat related to https://github.com/kr1sp1n/node-vault/issues/23
node-vault 0.9.5
As the comment in #23 said, you can pass that to the request options object, and that worked for me. That said, following redirects seems like a sensible default since none of these operations will work without it. It would be a potentially breaking change, so at least showing that in the docs could be helpful.
Oh, and if @whitebyte 's code doesn't work, I did something slightly different:
const result = await this.vault.write(
'/totp/keys/[email protected]',
{ url: 'otpauth://totp/SecSys:[email protected]?issuer=SecSys&secret=somesecret' },
{ followAllRedirects: true },
);
No activity since 2k19; Closing for now :) feel free to reopen if needed