obsidian-copilot icon indicating copy to clipboard operation
obsidian-copilot copied to clipboard

Move the Api Tokens to local storage instead of storing them in data.json

Open babeal opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

While encrypting the tokens is a step in the right direction, I still don't want credentials or derivatives of credentials stored on disk in the same file as the plugins general settings to be synced to cloud services.

Describe the solution you'd like

Take a look at https://github.com/gavvvr/obsidian-imgur-plugin/blob/main/src/uploader/imgUploaderFactory.ts for a reasonable solution. The obsidian imgur plugin uses local storage to store the key for imagur after authentication and would be a good place for the api tokens. This way the key is not on disk, doesn't get backed up to obsidian data service, git, or icloud, and allows the sharing of the rest of the configuration.

Describe alternatives you've considered

Adding the data.json to .gitignore but then I have to reconfigure this plugin for every client I have.

babeal avatar Dec 07 '24 00:12 babeal