How I can get proper public keys for apple signin

390 views Asked by At

I'm trying to implement apple signin and get a token from appleid provider and i've found out the jwks-client can do the trick but I can't get necessary keys. For some reason it returns nothing as a public key. What uri I need to use to get public keys?

const kid = JSON.parse(header).kid;

const jwksClient = require('jwks-client');
const client = jwksClient({
    jwksUri: // what do i need to use?
});

client.getSigningKey(kid, (err, key) => {
    // no key returned
});
1

There are 1 answers

0
svyat1s On BEST ANSWER

Try using https://appleid.apple.com/auth/keys as stated on the apple dev portal documentation.