mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-15 06:52:04 +00:00
feat(integrations): add one token lifecycle for every OAuth provider
A provider describes where its grant lives and how its token endpoint is called; the kit reads the grant, refreshes it under the per-user advisory lock, re-reads under the lock so a peer's refresh or a reconnect wins, and writes back only over the refresh token it spent. Retry-After is read in one place, both forms, with a cap.
This commit is contained in:
1 parent
45da8ae971
commit
23f6fe4c6e
7 files changed
+570
-10
No files matched your search
@@ -62,7 +62,14 @@ export async function persistRotatedToken(
|
||||
}
|
||||
|
||||
export type SerializedRefreshProvider =
|
||||
"whoop" | "withings" | "oura" | "codex" | "admin-codex";
|
||||
| "whoop"
|
||||
| "withings"
|
||||
| "oura"
|
||||
| "strava"
|
||||
| "google-health"
|
||||
| "polar"
|
||||
| "codex"
|
||||
| "admin-codex";
|
||||
|
||||
/**
|
||||
* Provider refreshes hold a database transaction open around one bounded
|
||||
|
||||
Reference in new issue
Block a user