Skip to content

[v3] Tokens fail to validate with WithAudience if "aud" is a string #1321

@ItalyPaleAle

Description

@ItalyPaleAle

According to RFC 7519, the "aud" claim is normally an array, but it could be a string too if there's a single value

https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3

In the general case, the "aud" value is an array of case-sensitive strings, each containing a StringOrURI value. In the special case when the JWT has one audience, the "aud" value MAY be a single case-sensitive string containing a StringOrURI value.

However, using WithAudience when validating a JWT using jwx v3.0.0-beta.1 fails if the "aud" claim in the token is a string.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions