Skip to content

Conversation

@blackmad-cradle
Copy link
Contributor

Description

This field is specified in the public docs - https://workos.com/docs/events - not sure if it should be optional or required

{ "event": "authentication.sso_succeeded", "id": "event_04FKJ843CVE8F7BXQSPFH0M53V", "data": { "type": "sso", "status": "succeeded", "user_id": "user_01E4ZCR3C5A4QZ2Z2JQXGKZJ9E", "email": "todd@example.com", "ip_address": "192.0.2.1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36", "sso": { "connection_id": "conn_01FKJ843CVE8F7BXQSPFH0M53V", "organization_id": "org_01E4ZCR3C5A4QZ2Z2JQXGKZJ9E", "session_id": "saml_session_01FKJ843CVE8F7BXQSPFH0M53V" } }, "created_at": "2023-11-18T04:18:13.126Z", "context": { "client_id": "client_01JVPGDV8WDHN5V5X5BX7C58X1" } }

Documentation

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

[ ] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

@blackmad-cradle blackmad-cradle requested a review from a team as a code owner February 11, 2026 18:51
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 11, 2026

Greptile Overview

Greptile Summary

This PR adds the sso nested object to SSO authentication event payloads, aligning the Python SDK type definitions with the public API documentation. The implementation creates a new AuthenticationSsoData class containing connection_id, organization_id, and session_id fields, and adds this as an optional field to both AuthenticationSsoFailedPayload and AuthenticationSsoSucceededPayload.

Changes:

  • Added AuthenticationSsoData class with three optional string fields
  • Added optional sso field to AuthenticationSsoFailedPayload
  • Added optional sso field to AuthenticationSsoSucceededPayload

The implementation follows the existing patterns in the codebase by using Pydantic models (extending WorkOSModel) and making all fields optional, which is appropriate for event data that may vary.

Confidence Score: 5/5

  • This PR is safe to merge with no identified risks
  • The changes are minimal, well-structured, and simply add optional fields to match the documented API. All fields are properly typed using Pydantic models following existing patterns. No logic changes, no security concerns, and backward compatible since all new fields are optional.
  • No files require special attention

Important Files Changed

Filename Overview
src/workos/types/events/authentication_payload.py Added AuthenticationSsoData class and sso field to SSO authentication event payloads to match public API documentation

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@gjtorikian gjtorikian left a comment

Choose a reason for hiding this comment

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

these are actually required, but I'm not able to make the change in this PR. will open my own fix soon

@gjtorikian gjtorikian merged commit dd7b8f0 into workos:main Feb 12, 2026
10 of 11 checks passed
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