This gist provides instructions to integrate Viscosity OpenVPN Client with 1Password password manager. It automatically fetches credentials (username and one-time password) from 1Password application and provides them to Viscosity so that you can connect to a VPN server without having to manually input your credentials every time. 1Password will ask you to authenticate with biometrics if necessary.
- Configure 1Password item for VPN credentials. Note vault name, item name, username label and one-time password label.
These need to be provided to
viscosity-credentials.sh
script via options (check help message).
- Install 1Password CLI.
- Add
viscosity-credentials.sh
to yourPATH
. - Create AppleScript with folllowing contents:
set credentials to do shell script "viscosity-credentials.sh -v <VAULT> -i <ITEM>"
return credentials
- Edit your Viscosity connection:
- Select your AppleScript in Advanced -> Before Connect Script
Use your biometrics to connect to a VPN server.
Screenshots