firebase / firebase/firebase-admin-node

[FR] Allow to upload APNs auth keys to Firebase

Đang mở
#2,204 1 bình luận 3 reaction 0 người được giao Xem trên GitHub
type: feature request
Ngôn ngữ chính
TypeScript
Star
1.7k
Fork
419
Merge trung bình
3 ngày 10 giờ
Pull request đã merge (30 ngày)
16

Mô tả

**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?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.