cli
cli copied to clipboard
[FEATURE] Expire cli tokens.
Is your feature request related to a problem? Please describe. It is annoying to use Doppler with remote servers or serverless services like Codespaces because I have to manually delete the CLI token every time (from the dashboard).
Describe the solution you'd like
There should be a way to define the token expiration time. Like doppler login -e 300
@alekslario Thanks for submitting this! We've opened an internal feature request issue to track this. In the mean time, there are a couple things you can do to reduce the friction around this.
- Login via the CLI, get the token with
doppler configure get token --plainand then set that as aDOPPLER_TOKENenvironment variable in GitHub's user Codespaces secrets. The CLI will automatically use any token set inDOPPLER_TOKEN, so this would alleviate the need to login at all. - For things like Codespaces, you can take advantage of volumes and the
DOPPLER_CONFIG_DIRenvironment variable to ensure your logged in CLI session is stored on a volume that gets remounted to your development container. This would survive across sessions. - Run
doppler logoutfrom the CLI on remote servers. This will allow you to revoke the CLI token from the command line immediately without having to find it in the dashboard.
Ultimately, this is definitely an area we want to improve though! Thanks again for your feedback!