Skip to content

feat(admin-portal): Add revokeLink and externalUserId on generateLink - #1727

Open
ajworkos wants to merge 2 commits into
mainfrom
adam/admin-portal-revoke-link
Open

ajworkos wants to merge 2 commits into
mainfrom
adam/admin-portal-revoke-link

Conversation

@ajworkos

Copy link
Copy Markdown
Contributor

Description

POST /portal/revoke_link shipped in the API on Oct 9 and reached the generated SDKs on Oct 15, but workos-node is not in the oagen SDK matrix, so its AdminPortal module stopped at generateLink. This mirrors the Python resource:

  • generateLink accepts externalUserId (sent as external_user_id).
  • revokeLink({ organization, externalUserId }) posts to /portal/revoke_link and resolves to undefined, like the other void endpoints in this SDK.

The admin-portal files carry an oagen "do not edit" header, but nothing regenerates them: Node is absent from openapi-spec/.github/sdk-matrix.json, and the port PR (#1629) has been stale since August. Hand-edited on purpose.

Documentation

[x] Yes

The API reference's revoke_link page has snippets for every SDK except Node. I'll open the docs PR once this is released.

🤖 Generated with Claude Code

POST /portal/revoke_link shipped in the API on 2026-10-09 and reached the
generated SDKs on 2026-10-15, but workos-node is not in the oagen SDK
matrix, so its AdminPortal module stopped at generateLink. Mirror the
Python resource: generateLink accepts externalUserId, and revokeLink
revokes every link generated with that id for the organization and
ends the portal sessions started from them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ajworkos
ajworkos requested review from a team as code owners October 16, 2026 13:38
@ajworkos
ajworkos requested a review from awolfden October 16, 2026 13:38

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

Devin Review

Comment thread src/admin-portal/admin-portal.spec.ts Outdated
Comment on lines +238 to +254
describe('with an externalUserId', () => {
it('sends it as external_user_id', async () => {
fetchOnce(portalLinkResponse, { status: 201 });

await workos.adminPortal.generateLink({
intent: GenerateLinkIntent.SSO,
organization: 'org_01EHQMYV6MBK39QC5PZXHY59C3',
externalUserId: 'user_12345',
});

expect(fetchBody()).toEqual({
intent: GenerateLinkIntent.SSO,
organization: 'org_01EHQMYV6MBK39QC5PZXHY59C3',
external_user_id: 'user_12345',
});
});
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔍 Duplicate external user ID test

The earlier externalUserId test sends the same request and checks the same body. This copy adds no coverage.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

? deserializeIntentOptions(response.intent_options)
: undefined,
adminEmails: response.admin_emails,
externalUserId: response.external_user_id,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔍 New serializer mapping lacks fixture coverage

The GenerateLink round-trip fixture omits external_user_id, so its test never checks whether the new field survives serialization.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

…the round-trip fixture

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Adds user-scoped Admin Portal link revocation.

  • Generated portal links can carry an application user ID.
  • Admins can revoke portal links and end their sessions.

No actionable issues found. Tests were inspected but not run.

ajworkos explicitly acknowledged that the generated files are hand-edited intentionally because Node is not regenerated.

Reviews (1) · Last reviewed commit: "test(admin-portal): Drop duplicated exte..." · Reviewed by Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant