To generate token from jwt.io we need public key. But how do we generate a public key for a specific private key
How to get the public key for appstore api ?
The nature of asymmetric crypto means that it’s usually possible to derive the public key from the private key. If you were working on an Apple platform you could do this by calling SecKeyCopyPublicKey. However, most Apple web APIs are meant to be consumed by non-Apple platforms, in which case you’ll have to consult the support resources for the platform you’re deploying to.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Did u find a solution to get the public key?
Not an expert, but seems like jwt.io doesn't use public key for token creation, but just for token verification.
In other words, you can insert anything (even keep it empty) into public key part on jwt.io and resulting token will be the same (and working for Appstore API).
But you can also generate public key from your private key. I used open SSL as hinted here https://www.baeldung.com/linux/public-key-from-private-key
Let's assume individual-ApiKey_2X9R4HXF34.p8 is file with private key downloaded from Developer Apple account and following command prints out public key
openssl pkey -in individual-ApiKey_2X9R4HXF34.p8 -pubout