Repository navigation
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
Original prompt from Madison
|
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryAdds
No actionable issues were found. Tests were inspected, not run. Reviews (1) · Last reviewed commit: "feat(connect): Add getAuthorizationUrl a..." · Reviewed by Greptile |
Description
Adds two URL builders for Connect Applications, so OAuth/MCP clients don't have to build the authorize URL by hand:
workos.connect.getAuthorizationUrl(options)returns${issuer}/oauth2/authorize?...workos.connect.getAuthorizationUrlWithPKCE(options)generates the code verifier, S256 challenge andstate, and returns{ url, state, codeVerifier }Supported options:
issuer,clientId,redirectUri,scope,state,nonce,organizationId,loginHint,prompt,resource,codeChallenge,codeChallengeMethod.response_type=codeis always set.organizationIdmaps toorganization_id, which is now strict on/oauth2/authorize(FEAT-3008 / FEAT-2968). The org picker is skipped, and a user who isn't an active member of the org is redirected toredirect_uriwitherror=access_denied.These are hand-written inside
@oagen-ignoreblocks, likeexchangeToken./oauth2/authorizeis served on the AuthKit domain (the issuer), notapi.workos.com, and isn't in the public OpenAPI spec. So the URL is built fromissuerinstead ofbaseURL, with any trailing slash removed.userManagement.getAuthorizationUrl(/user_management/authorize) is unchanged.Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
The Connect authorize reference already documents
organization_id. A Node snippet could be added there later.Link to Devin session: https://workos.devinenterprise.com/sessions/7eb7f4b6911143119e16e337f4461843
Open in Devin Desktop: https://workos.devinenterprise.com/desktop/session/7eb7f4b6911143119e16e337f4461843?variant=devin
Requested by: @m0tzy
🟢 Devin Review found nothing to fix · View findings