mvdan / bitw

Minimalist BitWarden client
BSD 3-Clause "New" or "Revised" License
169 stars 15 forks source link

Serve does not detect changes coming from sync #18

Open johnhamelink opened 4 years ago

johnhamelink commented 4 years ago

Hi there,

I'm checking out your project after reading through this thread. I'm happy to see it's still being maintained and worked on, this is definitely something the Bitwarden ecosystem needs in my humble opinion!

After building the application as per your instructions, I:

It seems like serve is not currently detecting when sync is invalidating cached passwords :)

mvdan commented 4 years ago

That sounds like a bug :) want to send a PR?

There are plenty of tests, but I'm not sure how to cover this well, given that the tests currently use static bitwarden data. Adding a TODO in the tests to cover this scenario would be good enough for now.

johnhamelink commented 4 years ago

All my free coding time is being spent on building an app for a job I'm interviewing for /right now/, but after I will give this a go, as I'd like to use bitw.

I'd also like to see about having a gui interface for inserting passwords, like with gnome-keyring & pinentry. Have you had any thoughts on how you might like that implemented?

mvdan commented 3 years ago

I'd still welcome a patch here, for what it's worth.

Sorry that I missed your question about password prompts. That's https://github.com/mvdan/bitw/issues/4.

mvdan commented 3 years ago

The simplest fix here would likely be to teach serve to watch data.json for changes, and re-load it if so. There should be portable Go packages to support watching for file changes in multiple OSs. If the system does not support it, we could always fall back to reloading the file every five minutes or so.