-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Background
The current implementation in packages/studiocms_socialposter/src/routes/postToBlueSky.ts logs in for every post request to BlueSky. This approach, while functional, creates unnecessary network calls and authentication overhead.
Enhancement Proposal
Refactor the BlueSky integration to use token-based authentication (JWT) which is supported by the BlueSky API:
- Implement a mechanism to perform a single initial login that returns access and refresh tokens
- Store and reuse the access token for subsequent requests
- Add logic to refresh the token when it expires
- Use the token in request headers for authenticated operations
Benefits
- Reduced network calls and better performance
- Alignment with BlueSky API best practices
- More resilient authentication flow
References
- PR discussion: Add new social media poster plugin #6 (comment)
This issue was created as a TODO item based on a review comment in PR #6.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels