fix: forward Radar context from authenticate_with_code_pkce#620
fix: forward Radar context from authenticate_with_code_pkce#620gjtorikian merged 2 commits intomainfrom
Conversation
Add ip_address, device_id, and user_agent kwargs to the PKCE code exchange helpers (sync + async) and forward them into the request body, matching the other authenticate_with_* helpers. The PKCE wrappers live in @oagen-ignore blocks, so they missed the Radar params when the rest of the auth surface picked them up. Fixes #618 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR adds Confidence Score: 5/5This PR is safe to merge — it is a straightforward additive change with no breaking modifications. All changes are additive optional parameters behind No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Caller
participant authenticate_with_code_pkce
participant WorkOS API
Caller->>authenticate_with_code_pkce: code, code_verifier,
ip_address?, device_id?, user_agent?
authenticate_with_code_pkce->>authenticate_with_code_pkce: build body
(grant_type, client_id, code, code_verifier)
alt Radar params provided
authenticate_with_code_pkce->>authenticate_with_code_pkce: append ip_address / device_id / user_agent
end
authenticate_with_code_pkce->>WorkOS API: POST /user_management/authenticate
WorkOS API-->>authenticate_with_code_pkce: AuthenticateResponse
authenticate_with_code_pkce-->>Caller: AuthenticateResponse
Reviews (2): Last reviewed commit: "test: add async omit-radar-context test ..." | Re-trigger Greptile |
Mirrors the sync coverage so both classes assert Radar fields are absent from the body when not provided. Addresses Greptile review on #620. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
ip_address,device_id, anduser_agentkwargs toauthenticate_with_code_pkce(sync + async) and forward them into the request body.authenticate_with_*helper (e.g.,authenticate_with_password,authenticate_with_code).# @oagen-ignore-start/# @oagen-ignore-endregions, so they were skipped by the generator when the rest of the auth surface picked up Radar params — this is the manual catch-up.Fixes #618.
Test plan
uv run pytest tests/test_inline_helpers.py— 25 passed🤖 Generated with Claude Code