I'm having issues to verify a postback with Skadnetwork/Apple according to the documentation Apple is giving out.
There are two issues I have (at least I think there are only two issues).
\u2063
- I'm using a PHP to grab all the information from a POST and then create the string for later verification. Sadly I'm not sure if the\u2063
should simply be there in the string or if it should there be in some encoded/decoded way.- The Apple Public Key - How should it be used. The version that is seen in the documentation in some decoded/encoded way. Docs say decode base 64 and then create X.509 standard public key from that.
Does anyone have a working example? At the moment I'm complete lost.
Im using NodeJS and it was pretty simple. I took Apple's public key and wrapped it with
-----BEGIN PUBLIC KEY-----\n
and\n-----END PUBLIC KEY-----
.Or you can use NodeJs crypto module to load the public key:
Then I concatenated the parts of the postback that are needed for the verification with
\u2063
separator.Then I used NodeJS crypto module to verify the signature:
This can be done in a similar way with Singular-SKAdNetwork-App
ECDSA
wrapper class from hereI hope this will help. I don't have any experience with PHP :/