Skip to content

Comments

Don't expose full credentials information in API#83

Merged
sergeychernyshev merged 2 commits intomainfrom
82-dont-expose-full-credentials-information-in-api-only-necessary-for-the-ui
Feb 23, 2026
Merged

Don't expose full credentials information in API#83
sergeychernyshev merged 2 commits intomainfrom
82-dont-expose-full-credentials-information-in-api-only-necessary-for-the-ui

Conversation

@sergeychernyshev
Copy link
Member

This PR refactors the credential listing logic to ensure that sensitive information such as access tokens and refresh tokens are not exposed to the UI or the public API.

Key changes:

  • Added PublicCredentialSchema to define safe credential fields.
  • Updated UserDO.listCredentials to filter and return only safe credential data.
  • Updated renderCredentialsList in the Worker to use the new filtered fields.
  • Added a new test case in userdo.spec.ts to verify that sensitive fields are correctly filtered out.

Closes #82

✨ Assisted by AI: Gemini

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 23, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
startup-api 44bc8ab Feb 23 2026, 01:19 AM

@sergeychernyshev sergeychernyshev merged commit 837fc50 into main Feb 23, 2026
2 checks passed
@sergeychernyshev sergeychernyshev deleted the 82-dont-expose-full-credentials-information-in-api-only-necessary-for-the-ui branch February 23, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't expose full credentials information in API, only necessary for the UI

1 participant