N
Novu3w ago
loup

APNs provider issue with private key

Im having some trouble when I setup APNs provider. Especially with the private key, what should I set ? Because when I add the content of the private key .p8 :
-----BEGIN PRIVATE KEY-----
(code)
-----END PRIVATE KEY-----
-----BEGIN PRIVATE KEY-----
(code)
-----END PRIVATE KEY-----
I have this in logs novu :
{
"jse_shortmsg": "Failed to generate token",
"jse_cause": {},
"jse_info": {},
"message": "Failed to generate token: secretOrPrivateKey must be an asymmetric key when using ES256"
}
{
"jse_shortmsg": "Failed to generate token",
"jse_cause": {},
"jse_info": {},
"message": "Failed to generate token: secretOrPrivateKey must be an asymmetric key when using ES256"
}
4 Replies
loup
loupOP3w ago
related https://discord.com/channels/895029566685462578/1353387321059180555 Well using node Ive success to upload my private key :
const data = await novu.integrations.update(integrationId, { // use your integration id
credentials: {
secretKey: fs.readFileSync("/tmp/code/AuthKey.p8", 'utf-8')
}
});
const data = await novu.integrations.update(integrationId, { // use your integration id
credentials: {
secretKey: fs.readFileSync("/tmp/code/AuthKey.p8", 'utf-8')
}
});
Each time we update the provider APNs in web ui, the secret key is broken again... Maybe for APNs provider we should upload the p8 key and the web ui parse it client side just to prevent issue with format
Pawan Jain
Pawan Jain3w ago
@loup Could you please send us the email to support@novu.co I would like to debug this from our end as we recently fixed this issue
loup
loupOP3w ago
Should i open a github issue ?
Pawan Jain
Pawan Jain3w ago
Are you using novu cloud or self hosting Novu?

Did you find this page helpful?