-
Notifications
You must be signed in to change notification settings - Fork 135
Conversation
The "Account" fields of th configuration would have to be moved into the token file as well |
The account information has been moved from the config file to I also added |
Is there any benefit in not having the token in the accounts file? |
No, that's probably a good idea. |
config/account.go
Outdated
|
||
// SetAccountsFile sets the accounts file path cache to the | ||
// entered value | ||
func SetAccountsFile(accountsFilePath string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code was copied and we should avoid duplication. If there's a bug in this code, it most likely won't be fixed for config. The same goes for all other code that was copied.
I still kinda dislike the fact that we'll log-out everyone that's arleady logged in. And this will also clear everyones already created cordless accounts. |
I agree with that, but I think it's a better solution than having permanent migration code. Then the question becomes whether or not it's worth it to log everyone out and clear their accounts in order to accomodate this feature. |
Well, maybe the migration code doesn't need to be permanent |
Hey, I am sorry for slacking for so long, I really haven't had much motivation lately. I'll try looking at this again over the next days. |
I am still kinda unsure with this. I really want to avoid logging everyone out. And like said, migration code is somewhat annoying too. But what if we added a version number to the configuration and added a manual configuration step. So that when you start cordless, says |
Closing this, as I am shutting down the project either way. |
Closes #262
Moves the token to a seperate file (~/.config/cordless/token).
Accepts -token-file parameter for custom token file location (same was as the custom config location).
Tested on Manjaro Linux x86_64 only and has not been tested with multiple accounts.