fix(backend): expose externalAccountId on ExternalAccount resource#8995
fix(backend): expose externalAccountId on ExternalAccount resource#8995jacekradko wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: afef28f The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthrough
ChangesExternal account ID mapping
🎯 2 (Simple) | ⏱️ ~10 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Comment |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
API Changes Report
Summary
@clerk/backendCurrent version: 3.8.3 🟡 Non-breaking Changes (1)Modified:
|
The backend
ExternalAccount.idis theidn_identification id for Google and Facebook accounts, so handing it tousers.deleteUserExternalAccount()(which wants theeac_id) returns a 404. This adds an optionalexternalAccountIdthat carries theeac_value.The part worth knowing is why it's optional. The Backend API only returns
external_account_idfor Google and Facebook accounts, whereidis theidn_value. Every other provider already returnsidas theeac_id and noexternal_account_id. So the deletable id isexternalAccountId ?? id, neverexternalAccountIdon its own, and the JSDoc plus changeset say as much. ThegetUserfixture now carries both agoogle_accountand a genericexternal_accountentry so the test asserts both shapes.This is an alternative to #8982, which mapped the same field but typed it as a required string and pointed callers at
externalAccountIddirectly, which would 404 for every non-Google/Facebook account.Fixes #7936
Fixes #7584