Skip to content

fix: set JWT audience claim to external URL for RFC 8707 compliance#133

Merged
hrntknr merged 2 commits intomainfrom
empty-aud
Apr 3, 2026
Merged

fix: set JWT audience claim to external URL for RFC 8707 compliance#133
hrntknr merged 2 commits intomainfrom
empty-aud

Conversation

@hrntknr
Copy link
Copy Markdown
Member

@hrntknr hrntknr commented Apr 3, 2026

Summary

JWT access tokens were issued with an empty aud claim, causing Claude.ai to reject them per RFC 8707 (Resource Indicators for OAuth 2.0). This fix ensures the aud claim contains the external URL by:

  • Setting Audience on registered clients to externalURL so fosite's audience matching strategy permits the value
  • Calling GrantAudience(externalURL) during the authorization flow so fosite includes it in the JWT

Type of Change

  • fix: A bug fix

Related Issues

Closes #129

@hrntknr hrntknr merged commit 351305a into main Apr 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JWT issued with empty aud claim breaks Claude.ai integration

1 participant