userscripts: fix qute-bitwarden failing with expired session #7781
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This could be seen as "mac failed" error in the logs.
The issue was that opening a session after it has been cached in qutebrowser caused the cache to be invalidated.
This PR adds "detection" of this situation and forces the user to log in again in such case.
The potentially problematic case is when
mac failed
string would be raised for another reason (that would not require user to log in again). But it's not likely in my opinion.I've tested this with the username/password, but I don't use TOTP in Bitwarden so couldn't check it. Logic seems the same though, so should work. Update: TOTP tested and works fine
Closes #7607