Spaces:
Paused
Paused
Download client/src/sync/authGate.ts from Leon4gr45/augmenttoolkit: direct link, hf CLI and curl.
- Browser
- Download file 555 Bytes
-
https://huggingface.co/spaces/Leon4gr45/augmenttoolkit/resolve/bb4da7e5d448e08c0375f8cfd152cb4fdc024f92/client/src/sync/authGate.ts
- Command line
-
hf download hf://spaces/Leon4gr45/augmenttoolkit@bb4da7e5d448e08c0375f8cfd152cb4fdc024f92/client/src/sync/authGate.ts
-
curl -L -o authGate.ts https://huggingface.co/spaces/Leon4gr45/augmenttoolkit/resolve/bb4da7e5d448e08c0375f8cfd152cb4fdc024f92/client/src/sync/authGate.ts
555 Bytes
| /** | |
| * Auth gate — a single boolean the sync layer checks before touching the | |
| * offline DB. It lets logout disable all background sync (flush / syncAll / | |
| * periodic triggers) *before* awaiting the DB swap, so an in-flight loop can't | |
| * re-seed the database after the user has logged out. | |
| * | |
| * Kept separate from authStore to avoid an import cycle | |
| * (authStore → tripSyncManager → authStore). | |
| */ | |
| let _authed = false | |
| export function setAuthed(value: boolean): void { | |
| _authed = value | |
| } | |
| export function isAuthed(): boolean { | |
| return _authed | |
| } | |