feat: added bitwarden session token as login option
This marks my debut with Python and my initial foray into contributing, so I welcome any guidance for future enhancements. I'm certain there's room for improvement.
I encountered an issue on both my Debian 12 and Windows 11 machines, both running Python 3.12 along with the latest Bitwarden CLI version (2024.2.0). Every time the Bitwarden CLI runs, it attempts to execute with the following output:
--session
mac failed.
<session token>
mac failed.
According to the Bitwarden forum (https://community.bitwarden.com/t/what-does-mac-failed-mean-exactly/29208), this error message has a somewhat complex underlying cause.
To address this, I attempted to use the session token directly which works perfectly fine for me.
However, it's worth noting that utilizing the session token directly from the command line may raise security concerns for some users.
Additionally, it might be beneficial to implement a safeguard preventing users from providing both bwpassword and bwsession simultaneously to mitigate any potential security risks.
Moreover, this solution could prove useful for anyone aiming to establish an automated sync setup.
sry for the late reply. thanks for your contribution! If you could make the parameter optional so one can choose to use the currently implemented way or yours (if problems occur) I'd be more than happy to merge it in ;-)