pilcrowonpaper / oslo

A collection of auth-related utilities
https://oslo.js.org
MIT License
1.06k stars 35 forks source link

Allow JWT aud to be a string #15

Closed rmarscher closed 9 months ago

rmarscher commented 9 months ago

Per the spec:

In the special case when the JWT has one audience, the "aud" value MAY be a single case-sensitive string containing a StringOrURI value.

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

I ran into this with my Apple ID token not being parsed. It uses a string for the aud value. Thanks!

pilcrowonpaper commented 9 months ago

Thanks!

rmarscher commented 9 months ago

@pilcrowOnPaper Thanks for merging! I just noticed the example in createJWT.md uses audience instead of audiences. https://github.com/pilcrowOnPaper/oslo/blob/main/docs/pages/reference/jwt/createJWT.md?plain=1#L66