Skip to content

feat: expose authentication method on action contexts - #139

Merged
gjtorikian merged 2 commits into
mainfrom
tars/actions-authentication-method
Aug 13, 2026
Merged

feat: expose authentication method on action contexts#139
gjtorikian merged 2 commits into
mainfrom
tars/actions-authentication-method

Conversation

@workos-tars

@workos-tars workos-tars Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description

Follow-up to workos/workos#68754. Expose authentication_method on the typed ActionContext returned by the Actions helper for authentication and user registration payloads. This reuses the existing AuthenticateResponseAuthenticationMethod enum.

Documentation

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

[ ] Yes

The Actions API documentation is covered by the API change; this PR only makes the existing payload field available through the Rust helper.

Test plan

  • cargo fmt --check
  • cargo test helpers::actions::tests

Requested by zac.burrage@workos.com via TARS

@greptile-apps

greptile-apps Bot commented Aug 12, 2026

Copy link
Copy Markdown

Greptile Summary

The PR exposes the signed action payload’s authentication method through ActionContext while retaining compatibility with omitted and future method values.

  • Adds an optional authentication_method field using the existing forward-compatible authentication-method enum.
  • Covers authentication, registration, omitted-field, and unrecognized-value deserialization.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/helpers/actions.rs Adds typed authentication-method deserialization to action contexts and tests known, absent, and unknown values.

Reviews (2): Last reviewed commit: "fix: make authentication_method optional..." | Re-trigger Greptile

@workos-tars

workos-tars Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

session restore failed HTTP 422: ENOSPC: no space left on device, write

A missing or null authentication_method made construct_action return a decode
error, failing a customer's entire Actions endpoint instead of returning an
Allow/Deny verdict. AuthenticateResponse already models the same field as an
Option, and the Go and Node SDKs degrade to a zero value rather than erroring.

Restores coverage for the field-free payload, which the updated tests no longer
exercised, and pins the Unknown forward-compat fallback.
@gjtorikian
gjtorikian merged commit 43cf7e8 into main Aug 13, 2026
6 checks passed
@gjtorikian
gjtorikian deleted the tars/actions-authentication-method branch August 13, 2026 13:47
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