Skip to content

Commit

Permalink
Fix incognito mode when there are no tokens (#878)
Browse files Browse the repository at this point in the history
* Fix incognito mode when there are no tokens

* Update changelog
  • Loading branch information
nmaytan authored Feb 5, 2025
1 parent a98122f commit 11f5f15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Write the date in place of the "Unreleased" in the case a new version is release

- Do not attempt to use auth tokens if the server declares no authentication
providers.
- Prevent "incognito mode" (remember_me=False) from failing after a previous
login session has since been logged out (no token files)

### Maintenance

Expand Down
2 changes: 1 addition & 1 deletion tiled/client/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def sync_clear_token(self, key):
with self._sync_lock:
if self.token_directory is not None:
filepath = self.token_directory / key
filepath.unlink(missing_ok=False)
filepath.unlink(missing_ok=True)
self.tokens.pop(key, None) # Clear cached value.

def sync_auth_flow(self, request, attempt=0):
Expand Down

0 comments on commit 11f5f15

Please sign in to comment.