Commit 4d4a1e5
fix(auth): move FwLiteWeb MSAL cache to a stable per-user location
The cache was pinned to AppContext.BaseDirectory (the binary directory).
Platform.Bible extracts each extension version to a versioned cache dir
(~/.platform.bible/cache/extensions/<name>_<version>/), so a binary-relative
cache is orphaned on every update — the user is silently logged out per
update — and a cache/ tree is also wipeable by cache cleaning.
Store msal.json under LocalApplicationData/SIL/FwLiteWeb instead (resolves
to %LOCALAPPDATA% on Windows, ~/.local/share on Linux, ~/Library/Application
Support on macOS), mirroring FwLiteMaui's stable-per-user pattern. Create the
directory up front since MsalCacheHelper needs a fully-qualified path with an
existing parent. Best-effort migrate an existing binary-relative msal.json so
standalone FwLiteWeb users are not logged out by this change.
Refs #2306
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 267964d commit 4d4a1e5
1 file changed
Lines changed: 25 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | 46 | | |
49 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
50 | 72 | | |
51 | 73 | | |
52 | 74 | | |
| |||
0 commit comments