N
Novu•3mo 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"
}
7 Replies
loup
loupOP•3mo 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 Jain•3mo 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
loupOP•3mo ago
Should i open a github issue ?
Pawan Jain
Pawan Jain•3mo ago
Are you using novu cloud or self hosting Novu?
loup
loupOP•2mo ago
Sry, I as using novu cloud
Pawan Jain
Pawan Jain•2mo ago
Do you get any validation error when you paste this key in the integration credentails?
loup
loupOP•2mo ago
Sadly no error 😅

Did you find this page helpful?