1Password / onepassword-sdk-python

https://developer.1password.com/docs/sdks/
MIT License
83 stars 9 forks source link

Support fetching TOTP codes via secret references #100

Closed simkimsia closed 1 month ago

simkimsia commented 2 months ago
  1. you need to know the difference between vault, item, and itemfield
  2. you need to know the vault id and item id

Originally posted by @simkimsia in https://github.com/1Password/onepassword-sdk-python/issues/99#issuecomment-2288018488

I solve my issue at #99 but I find it tedious.

Because i needed to iterate through all my vault and then all teh items in teh vault before I can know exactly what id to use to retrieve the item.

Esp the case that onepassword app cannot show the item or vault id. The app does show secret reference.

My recommendations are:

  1. make it easy to know the identifier
    1. allow app to show vault / item / item field id. not just secret reference
    2. OR allow the sdk to fetch itemfield by secret reference
  2. allow SDK to fetch itemfield directly with a single identifier that's either id or secret reference (currently no function at all)
  3. allow SDK to fetch item directly with a single identifier (currently need vault id AND item id)
SimonBarendse commented 2 months ago

Hi @simkimsia , this is currently not yet supported, but we agree this would be a great improvement and are planning to add it soon. Thank you for expressing your interest!

SimonBarendse commented 2 months ago

I've separated out the two feature requests of fetching TOTP codes through a single secret reference (this ticket #100) and ability to copy UUIDs from the desktop apps (https://github.com/1Password/onepassword-sdk-python/issues/101).

ApprenticeofEnder commented 2 months ago

This sounds interesting! Do you already have folks assigned?

MOmarMiraj commented 1 month ago

Hi Guys,

With the release of the Python SDK v0.1.2, you are now able to acquire TOTP codes from secret references.

You can take a look at the release notes for more information and how to do it.

I will close this issue and if theres any concerns, please let me know!