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:
9
src/constants/backgroundJwt.ts
Normal file
9
src/constants/backgroundJwt.ts
Normal 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;
|
||||
Reference in New Issue
Block a user