Generate TOTP

View as Markdown

Generate the current one-time password for a Vault login secret with a stored TOTP seed. The seed itself is never returned.

Generate a code

1const result = await bctrl.tools.call("vault.totp.generate", {
2 name: "production/github/login",
3});
4
5console.log(result.code);

The caller must be authorized to use the secret, and the Space Vault policy must allow the operation. Do not log the generated code.

Request parameters

ParameterTypeRequiredDescription
nameVaultSecretNameYesLogin secret containing a TOTP seed.

Response

FieldTypeAlways presentDescription
codestringYesCurrent one-time password.

Next