ReviewOS

stacks/postline

[MVP] OAuth token refresh for LinkedIn, Instagram, Threads

#19
Closed glennmichael123 opened this 9 days ago ·
9 days ago

LinkedIn/Instagram/Threads access tokens expire (days–weeks). Without refresh, a connected account silently stops publishing and the user only finds out when a post fails.

Scope

  • Store refresh tokens + expiry on social_identities (Bluesky already refreshes via withFreshSession)
  • Refresh before publish when the token is near/after expiry; persist the rotated token
  • Long-lived-token exchange where the platform requires it (IG/Threads long-lived tokens, ~60 days)
  • Surface "reconnect needed" on /accounts when refresh fails

Sign in to comment on this issue.