firebase / firebase/firebase-admin-node

[FR] Allow to upload APNs auth keys to Firebase

Aperta
#2,204 1 commento 3 reazioni 0 assegnatari Vedi su GitHub
type: feature request
Lingua principale
TypeScript
Stelle
1.7k
Fork
419
Merge medio
3g 10h
PR unite (30g)
16

Descrizione

**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:
```js
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?

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.