Validate JWT from StoreKit 2 using PHP

How can I validate the JWT from a purchase from StoreKit 2 using PHP? I can't find any example on the internet. The video say "Then use your favorite cryptographic library to verify the data with", but I don't know anything about that.

Answered by pableiros1 in 717335022

After doing a lot of research, finally I developed a working solution: https://stackoverflow.com/a/72638944/3701102

Hello! This session covers some more details surrounding validating JWTs. https://developer.apple.com/videos/play/wwdc2022/10040/

Additionally, looking up "PHP jwt library" may yield some useful libraries for your use case.

But what is the name of the process we need to do in order to validate the JWT? Because the libraries have a lot of functionality and there is no documentation from Apple to know where to start. Some libraries requires a "public key", another libraries requires a "private key", some methods requires a "passphrase", where do I get those things from the Apple?

Accepted Answer

After doing a lot of research, finally I developed a working solution: https://stackoverflow.com/a/72638944/3701102

Validate JWT from StoreKit 2 using PHP
 
 
Q