Protect what matters – even after you're gone. Make a plan for your digital legacy today.
Forum Discussion
Former Member
3 years agoLocal NodeJS script - use item from 1password personal vault
How can I use an item stored in 1Password personal vault from NodeJS script running locally? I see connect-sdk-js requires "1Password Connect API hosted on your infrastructure". Is it possible to do ...
Former Member
3 years agoThanks Jack_P_1P. I was able to create .env file with entries like USERNAME=op://<VaultName>/<ItemId>/username. I then referenced the environment variable from nodejs script.js const userId = process.env.USERNAME;. I was then able to run the nodejs script by specifying in package.json -
"scripts": {
"scriptname": "op run --no-masking --env-file=\"./.env\" -- node ./script.js"
}