Skip to content

Conversation

@jsdt
Copy link
Contributor

@jsdt jsdt commented Oct 30, 2025

Description of Changes

The aud claim is required in the OIDC spec, but the server currently allows it to be missing, and the spacetime auth tokens we use for the website don't have an audience.

Previously the module bindings would throw an error if there were no aud claim in a jwt payload (if someone used the audience within a reducer), but this change makes us treat a missing audience as an empty list.

This also renames the authCtx fields to senderAuth in the typescript and csharp module APIs, so they match rust.

API and ABI breaking changes

This doesn't break any ABIs.

This changes the ReducerContext APIs in typescript and rust, but only by renaming a field that hasn't been released yet.

Expected complexity level and risk

Testing

I've tested accessing the audience within a reducer for a token missing an aud claim in Typescript and Rust.

Copy link
Collaborator

@jdetter jdetter left a comment

Choose a reason for hiding this comment

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

The rust and C# changes look correct to me, I'm not as familiar with TypeScript but Jeff says that he has already tested it. Given this I'm fine to approve 👍

(I have not tested any of this myself)

@jsdt jsdt enabled auto-merge October 30, 2025 21:25
@jsdt jsdt disabled auto-merge October 30, 2025 21:32
Copy link
Contributor

@cloutiertyler cloutiertyler left a comment

Choose a reason for hiding this comment

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

These changes look good to me.

@jsdt jsdt added this pull request to the merge queue Oct 31, 2025
Merged via the queue into master with commit 9586136 Oct 31, 2025
24 of 25 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Oct 31, 2025
# Description of Changes

This adds some code samples for using auth claims in Rust, Typescript,
and C#.

Much of this was originally in
#3218.

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

# Expected complexity level and risk

1: this is a docs-only change.

# Testing

I've tested these code samples locally (with the changes in
#3542).

---------

Signed-off-by: Jeffrey Dallatezza <jeffreydallatezza@gmail.com>
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
@jsdt jsdt deleted the jsdt/handle-missing-aud branch October 31, 2025 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants