Skip to content

feat(core,schemas): add get user social identities token secret API #7494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 3, 2025

Conversation

simeng-li
Copy link
Contributor

@simeng-li simeng-li commented Jul 1, 2025

Summary

Add get user's social identity token secret API.

This PR also includes the following updates:

  • fix: fix the PATCH /api/connectors/:id endpoint enableTokenStorage not updated bug

Testing

test locally

image

Checklist

  • .changeset
  • unit tests
  • integration tests
  • necessary TSDoc comments

@simeng-li simeng-li requested review from a team and Copilot July 1, 2025 08:08
@github-actions github-actions bot added feature Cool stuff size/s labels Jul 1, 2025
Copy link

github-actions bot commented Jul 1, 2025

COMPARE TO master

Total Size Diff 📈 +3.73 KB

Diff by File
Name Diff
packages/core/src/queries/secret.ts 📈 +933 Bytes
packages/core/src/routes/admin-user/social.openapi.json 📈 +931 Bytes
packages/core/src/routes/admin-user/social.ts 📈 +1.07 KB
packages/core/src/routes/connector/index.ts 📈 +30 Bytes
packages/schemas/src/types/secrets.ts 📈 +829 Bytes

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new API to retrieve a user's social identity token secret for federated token exchanges and extends the related schema and query functionalities. The key changes include:

  • Adding new type guards and types for managing social token set secrets in the schemas package.
  • Implementing a new admin route in the core package to expose the secret via a GET request when development features are enabled.
  • Enhancing the secret queries with a method to find the social token set secret based on user ID and target.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/schemas/src/types/secrets.ts Adds new type guards and types to support social token set secrets.
packages/core/src/routes/admin-user/social.ts Introduces a new development-only route to retrieve desensitized social token set secrets.
packages/core/src/queries/secret.ts Adds a query method to fetch the social token set secret and updates identifier conversion.

@github-actions github-actions bot added size/m and removed size/s labels Jul 1, 2025
@simeng-li simeng-li requested a review from darcyYe as a code owner July 2, 2025 06:18
@simeng-li simeng-li force-pushed the simeng-log-11665-integration-test branch from 16f748e to 7cd9392 Compare July 2, 2025 07:20
@simeng-li simeng-li force-pushed the simeng-log-11665-integration-test branch from 9946089 to 22a8847 Compare July 2, 2025 07:43
@github-actions github-actions bot added size/m and removed size/l labels Jul 2, 2025
@simeng-li simeng-li marked this pull request as draft July 2, 2025 07:47
@github-actions github-actions bot added size/m and removed size/m labels Jul 2, 2025
@simeng-li simeng-li marked this pull request as ready for review July 2, 2025 08:20
@github-actions github-actions bot added size/m and removed size/m labels Jul 2, 2025
Base automatically changed from simeng-log-11665-experience-api-store-tokens-to-secret-vault to master July 2, 2025 08:54
@github-actions github-actions bot added size/xl and removed size/m labels Jul 2, 2025
simeng-li added 3 commits July 2, 2025 16:54
add get users social identities token secret API
fix patch connector API enableTokenStorage not updated bug
@simeng-li simeng-li force-pushed the simeng-log-11665-integration-test branch from 93ce80a to 91f7970 Compare July 2, 2025 08:54
@github-actions github-actions bot added size/m and removed size/xl labels Jul 2, 2025
Copy link
Contributor

@darcyYe darcyYe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, is it doable to add integration tests for the API?

@simeng-li simeng-li merged commit 1597dd0 into master Jul 3, 2025
44 of 45 checks passed
@simeng-li simeng-li deleted the simeng-log-11665-integration-test branch July 3, 2025 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants