feat(notifications): mint long-lived JWT for native New Activity prefetch (Phase A)

Add BACKGROUND_JWT_EXPIRY_DAYS/SECONDS and accessTokenForBackgroundNotifications
via createEndorserJwtForDid; configureNativeFetcher uses it instead of getHeaders
so WorkManager prefetch is not stuck with a 60s access token. Interactive API
calls unchanged.
This commit is contained in:
Jose Olarte III
2026-03-27 21:33:46 +08:00
parent c9ea2e4120
commit 9f44a53047
4 changed files with 31 additions and 9 deletions

View File

@@ -0,0 +1,9 @@
/**
* JWT lifetime for native New Activity background prefetch (`configureNativeFetcher`).
* Phase A: single long-lived token minted in TS; see doc/plan-background-jwt-pool-and-expiry.md.
* Confirm max `exp` with Endorser before raising.
*/
export const BACKGROUND_JWT_EXPIRY_DAYS = 90;
export const BACKGROUND_JWT_EXPIRY_SECONDS =
BACKGROUND_JWT_EXPIRY_DAYS * 24 * 60 * 60;