Skip to content

feat(pipes): Return state from authorizeDataIntegration - #1750

Merged
dandorman merged 1 commit into
mainfrom
devin/1793721227-pipes-authorize-state
Nov 3, 2026
Merged

dandorman merged 1 commit into
mainfrom
devin/1793721227-pipes-authorize-state

Conversation

@dandorman

Copy link
Copy Markdown
Contributor

Description

The API now returns a state value from POST /data-integrations/{slug}/authorize. WorkOS adds it to return_to together with connect_code or error. Apps should store it in the user's session along with the code_verifier, then compare it when the user comes back.

This adds state to DataIntegrationAuthorizeUrlResponse and its deserializer, so workos.pipes.authorizeDataIntegration() returns it.

The interface, serializer, and fixture come from running oagen on the latest openapi-spec with --services Pipes. I kept only the files for the state field and dropped the rest of the regen, which touched unrelated files. I also updated the Pipes specs to assert on state.

The emitter types state as optional (state?: string) and the deserializer falls back to ''. It handles new fields on existing response models the same way elsewhere (e.g. vault ObjectVersion.etag), which means adding the field doesn't break code that builds this type by hand.

Documentation

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[ ] Yes

Link to Devin session: https://app.devin.ai/sessions/c1fae00a96eb4b33a1d36d1aab402610
Open in Devin Desktop: https://app.devin.ai/desktop/session/c1fae00a96eb4b33a1d36d1aab402610?variant=devin
Requested by: @dandorman

Regenerated from the spec's new required DataIntegrationAuthorizeUrlResponse.state field.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

Original prompt from dan

can you update the Node SDK? Just include the very recent Pipes changes that add state as a parameter in the response

@dandorman
dandorman requested a review from atainter November 3, 2026 15:54
@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Adds state to the response returned by authorizeDataIntegration().

  • Pipes authorization calls now return the state value from WorkOS.

Reviews (1) · Last reviewed commit: "feat(pipes): Return state from authorize..." · Reviewed by Greptile

@dandorman
dandorman requested a review from thompsongl November 3, 2026 16:30
@dandorman
dandorman merged commit fcc2777 into main Nov 3, 2026
9 checks passed
@dandorman
dandorman deleted the devin/1793721227-pipes-authorize-state branch November 3, 2026 18:00
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.

2 participants