DarrenBaldwin07 / clerk-rs

An unofficial Rust SDK for Clerk.dev
https://crates.io/crates/clerk-rs
MIT License
57 stars 23 forks source link

azp claim should be optional #41

Closed hazelmeow closed 1 month ago

hazelmeow commented 1 month ago

The azp claim may not always exist on the Clerk JWT. From the Clerk docs:

azp: authorized party - the Origin header that was included in the original Frontend API request made from the user. Most commonly, it will be the URL of the application. For example: https://example.com. This claim could be omitted if, for privacy-related reasons, Origin is empty or null.

This causes an error when decoding the JWT because azp is required in ClerkJwt: Error(Json(Error("missing field `azp`", line: 1, column: 185))).

DarrenBaldwin07 commented 1 month ago

Closed via https://github.com/DarrenBaldwin07/clerk-rs/commit/122765a1f14d95a2349ab203ed886c3c19e1dd97