Groups
Groups
Sign in
Groups
Groups
node-apn
Conversations
About
Send feedback
Help
Use p8 string instead of file
335 views
Skip to first unread message
Olav Gausaker
unread,
Apr 26, 2017, 7:58:39 AM
4/26/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to node-apn
Hi!
Is there a way to use the string on the p8 file instead of the p8 file instead? I mean, instead of this:
token: {
key: "key.p8",
keyId: "ABCDEFGHI",
teamId: "JKLMNOPQR"
}
...use this:
token: {
key: "MJHGgfdDUYTgfdFDsasFGH...",
keyId: "ABCDEFGHI",
teamId: "JKLMNOPQR"
}
Thanks!
Nesim Sisa
unread,
Sep 14, 2017, 7:24:09 PM
9/14/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to node-apn
YES
Luckily there is the typescript definition for the package!
https://github.com/node-apn/node-apn/blob/master/index.d.ts
which shows the string version can be passed as well:
/**
* The filename of the provider token key (as supplied by Apple) to load from disk, or a Buffer/String containing the key data.
*/
key
:
Buffer
|
string
;
Akshay Mehta
unread,
Dec 30, 2017, 4:49:37 AM
12/30/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to node-apn
I get this error - even if I send the full key string or if I send the filename/path:
Failed loading token key: fs.readFileSync is not a function. (In 'fs.readFileSync(value)', 'fs.readFileSync' is undefined)
Please advise.
Thanks
Reply all
Reply to author
Forward
0 new messages