6c431e8821
Key at data_dir.parent/.garmin_key — nginx serves location /data/ { alias /var/bincio/data/; } so
anything inside that dir is reachable. The key lives one level up at /var/bincio/.garmin_key,
outside nginx's reach.
Two-layer storage — garmin_creds.json holds the encrypted email+password (needed for re-login when
tokens expire); garmin_session/ holds the garth OAuth tokens in plain JSON (short-lived, not the
user's actual password).
test_login() — called by the connect endpoint before saving anything, so credentials are only
persisted if they actually work.
get_client() — tries the session first (fast, no network), falls back to full re-login
transparently. The caller never needs to think about whether the session is fresh.
43 lines
578 B
Plaintext
43 lines
578 B
Plaintext
# Python
|
|
__pycache__/
|
|
*.py[cod]
|
|
*.egg-info/
|
|
.venv/
|
|
dist/
|
|
build/
|
|
.mypy_cache/
|
|
.ruff_cache/
|
|
.pytest_cache/
|
|
htmlcov/
|
|
.coverage
|
|
.idea*
|
|
feedback*
|
|
|
|
# uv
|
|
uv.lock
|
|
|
|
# Node / Astro
|
|
site/node_modules/
|
|
site/dist/
|
|
site/.astro/
|
|
|
|
# BAS data stores (user data, not committed to the tool repo)
|
|
bincio_data/
|
|
*.bincio_cache.json
|
|
|
|
# Local config / secrets (never commit)
|
|
.env
|
|
extract_config.yaml
|
|
|
|
# Capacitor native projects
|
|
# Commit these if you want to track native code changes;
|
|
# omit these lines if you regenerate them from `npx cap add`
|
|
site/android/
|
|
site/ios/
|
|
|
|
# Data
|
|
data/*
|
|
|
|
# OS
|
|
.DS_Store
|