My mfa otp works fine on the GUI client but no the cli
I have an mfa setup for an AWS account and this works perfectly fine on the GUI.
However if I try and get my otp through the 1password cli I keep getting this error
op get totp AWS
[ERROR] 2021/12/02 22:48:23 Item AWS does not contain a one-time password
For what its worth I am able to access the item json itself and individual fields like my password using --fields password through the CLI without a problem.
Any help is appreciated, thanks!
1Password Version: 7.9.1
Extension Version: Not Provided
OS Version: 11.6
Comments
-
Hi @Noella,
When you retrieve the item using
op get item [uuid]
, does the json contain a field where the "t" field is"t": "one-time password",
and the "n" field has the prefix"TOTP_"
?This is how the CLI looks for the TOTP field when you call
op get totp
.Looking forward to hearing back,
Artem
0 -
Aha! It appears there might be two 'entries' for the field somehow and maybe the bad ones getting picked up..
"sections": [
{
"name": "linked items",
"title": "Related Items"
},
{
"fields": [
{
"k": "concealed",
"n": "TOTP_7891E0D72B4D4AC3AB5ED886502005D2",
"t": "",
"v": ""
}
],
"name": "Section_96AAD171D36149E4BA225A2083E2C397",
"title": ""
},
{
"name": "Section_94B38591D3944DA998C2C21BD22B4E5F",
"title": ""
},
{
"fields": [
{
"k": "concealed",
"n": "TOTP_E078830575474EF0AA35A3605DF1D285",
"t": "one-time password",
"v": "otpauth://totp/Amazon%20Web%20Services .."
}
],
"name": "Section_E6EBC90F13334337B425021707672F65",
"title": ""
}0 -
Just to close the loop on this! After I deleted and recreated the physical entry for this login in 1password I'm getting the OTP fine. Thanks for all your help!
0