I’m trying to save the contents of a
.p8 file in secrets. Typically, the contents would look something like this:
-----BEGIN PRIVATE KEY----- MIGTAgEANBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgnu1O+vrbXT6IY6xY jyHBzvL0LFyzjE6qENqWmgjf4DSGCgYIKoZIzj0DAQehRANCAARr96LHJSLoApun yxf0umUPYcBvdjy2yeTrZMjmTQ0Biddl+xsTjJMLvfvnIwgNYQasHpshvarDlyC8 mBqkjg2N -----END PRIVATE KEY-----
When I paste it to secrets, it’s saved in one line and once retrieved, seems to be malformed because I cannot initialize the push notification client that requires it. I say “seems” because the client initializer that requires the key errors out.
However, if I hard-code the key in the app as shown above (respecting the multi lines), then it works fine and the client initializes properly.
Is there a way to make it work using secrets?