Skip to content

user.externalAccounts[].id returns idn_ id, not eac_ id. users.deleteUserExternalAccount() not working. #7584

@JaapWeijland

Description

@JaapWeijland

Preliminary Checks

  • I have reviewed the documentation: https://clerk.com/docs

  • I have searched for existing issues: https://github.com/clerk/javascript/issues

  • I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)

  • This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.

Reproduction

https://github.com/JaapWeijland/clerk-external-account-reproduction

Publishable key

pk_test_aG9wZWZ1bC1tYWdwaWUtOTcuY2xlcmsuYWNjb3VudHMuZGV2JA

Description

Steps to reproduce:

  1. Fetch the user with clerkClient.users.getUser()
  2. Inspect the ID of an external account connected to Google SSO.

Expected behavior:

The id starting with eac_, so it can be consumed by clerkClient.users.deleteUserExternalAccount()

Actual behavior:

The id starting with idn_, causing clerkClient.users.deleteUserExternalAccount() to reject the ID with error:

ClerkAPIError {
      code: 'external_account_not_found',
      message: 'Invalid external account',
      longMessage: 'The External Account was not found.',
      meta: [Object]
}

The interesting thing is that, when I inspect the user JSON via the Clerk dashboard, it does show the correct id starting with eac_. So I think the SDK returns the wrong ID here.

Environment

Bun: v1.3.4
Clerk: `"@clerk/backend": "^2.29.2",`

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageA ticket that needs to be triaged by a team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions