When trying to deploy on fly I was facing an issue with the reading of the apns .p8 cert.
I couldn't find a good way to securely store the cert so it could be read in the application so that just leaves an env var.
However when you do the naive thing setting APNS_P8_CERTIFICATE to the .p8 file contents the server will fail with an error initing client.Production()
This pr allows the user to set the env by explicitly escaping the newlines:
When trying to deploy on fly I was facing an issue with the reading of the apns .p8 cert.
I couldn't find a good way to securely store the cert so it could be read in the application so that just leaves an env var.
However when you do the naive thing setting
APNS_P8_CERTIFICATE
to the.p8
file contents the server will fail with an error initingclient.Production()
This pr allows the user to set the env by explicitly escaping the newlines:
If the
.p8
cert isthen you can set the env var as follows
If I am just missing a better way to do this please let me know 🙏