1Password / onepassword-sdk-js

The official JavaScript SDK for 1Password
https://developer.1password.com/docs/sdks/
MIT License
54 stars 3 forks source link

Option to connect to 1password desktop application - for auth and local data #111

Open theoephraim opened 5 days ago

theoephraim commented 5 days ago

Use Case

I am building developer tools, and for local development, I'd like to be able to use the SDK without a service account token, and instead rely on the local 1password application. This is similar to the CLI's desktop app integration. The purpose of this is to rely on existing auth and unlock (especially biometric), and reduce the need to pass around and store plaintext service account tokens.

This could also enable using the application's local data cache, which would help with performance, rate limits, and allow offline mode.

Requirements and desired behavior

I imagine new flags that would enable this behaviour, and allow the client to be initialized without a service account token.

The additional piece about relying on the local app's cached data is also important, as this could make these requests extremely fast, and not eat up rate limits during local development.

Additional information

No response

maxstreese commented 3 days ago

I would like to second this and add that this would not only be useful for development tool authors but also for business developers like myself.

Example: Implementing some scripts that you would like to both run locally, as well as in some automated workflow setup like CI. Currently I resort to using the CLI for this. That adds more friction to others in the team though, as locally you need to do op run --env-file=.env -- <e.g. deno run ...>.