Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't wipe all accounts if keychain token cannot be found #1419

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

Sjmarf
Copy link
Contributor

@Sjmarf Sjmarf commented Oct 30, 2024

Previously if a token wasn't found in the keychain Mlem would reset the JSON account list file. Instead of resetting the JSON file, I've made it fallback to setting an arbitrary string as the token. This will cause Mlem to pick up on the token being invalid when it tries to perform an authenticated request, and show the re-auth sheet.

In normal circumstances, a token should always be present in the keychain. However, in #1416 an account's token is consistently missing from the keychain. I haven't been able to reproduce this exact issue myself yet.

@Sjmarf Sjmarf requested a review from a team as a code owner October 30, 2024 22:33
@Sjmarf Sjmarf requested review from WestonHanners and JakeShirley and removed request for a team October 30, 2024 22:33
Copy link
Member

@EricBAndrews EricBAndrews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@Sjmarf Sjmarf enabled auto-merge (squash) November 1, 2024 21:18
@Sjmarf Sjmarf merged commit 5e4a53a into dev Nov 1, 2024
2 checks passed
@Sjmarf Sjmarf deleted the sjmarf/keychain-changes branch November 1, 2024 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants