following the documentation of the hash-vault-js
node package I am trying to use I should be able to get the token from the response using:
const token = await vault.loginWithAppRole(RoleId, SecretId).client_token;
but
console.log(token);
returns undefined
.
The full response is:
{
client_token: 'hvs.CAESIBbqO37msc9GKEMnYLm0B40tSeA1VuOQtkOqzx4q47BTGh4KHGh2cy50MUZra3V4UFYwSXZNdkhaYjJPTEtMY2M',
accessor: 'L321k60IkDv7QDJPS8yBurBM',
policies: [ 'default' ],
token_policies: [ 'default' ],
metadata: { role_name: 'liveslowsailfast' },
lease_duration: 1200,
renewable: true,
entity_id: '079a8b50-8177-f044-c99d-690ef269db9d',
token_type: 'service',
orphan: true,
mfa_requirement: null,
num_uses: 0
}
So the question now is: what is the correct way to retrieve the client_token value?