Skip to content

[FR] Allow to upload APNs auth keys to Firebase #2204

Description

@Kampfmoehre

Is your feature request related to a problem? Please describe.
We are trying to automate Firebase app creation since we manage many apps and most of them need push notifications. I played around with the Firebase admin SDK and got the most stuff working somehow, but I can't figure out how to upload the APNs auth key to Firebase. Is there and official way to do this via this SDK or via Rest API?

Describe the solution you'd like
I would like to have an SDK method or rest API endpoint where I can upload an Apple Push Notification service authentication key to Firebase so we can send push notifications to iOS apps managed in Firebase.

Describe alternatives you've considered
The alternative to having a method in the SDK would be at least a rest API endpoint.

Additional context
Funnily in my desperation I asked ChatGPT how it would solve this and it generated this code:

const messaging = admin.messaging(app);
const apnsKey = {
  authKey: '/path/to/AuthKey_XXXXXXXX.p8',
  keyId: 'XXXXXXXX',
  teamId: 'XXXXXXXX',
};

messaging.setApnsCredential(credential, apnsKey);

But I looked around the repo (even in older revisions) and could not find any method like this. Was there any and if yes, when and why was it removed?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions