dawenxi-tech / 2fa

A 2FA desktop application.
MIT License
2 stars 1 forks source link

fix config storage to be cross platform #13

Open gedw99 opened 9 months ago

gedw99 commented 9 months ago

With the move to Windows also, we need to fix the config storage code.

https://github.com/dawenxi-tech/2fa/blob/main/storage/path_macos.go is probably not needed.

https://github.com/gioui/gio/blob/main/app/datadir.go is the GIO code that is cross platform, so we should use it.


https://github.com/dawenxi-tech/2fa/blob/main/storage/encrypt.go#L15 also needs fixing as its hardcoded with the bundle ID.

https://github.com/gioui/gio-cmd/tree/main/gogio is the gio cmd to build which will then handle the bundle id for use too.

heramerom commented 9 months ago

Than's greate, you are correct. I will fix the code later.