From 20572b419d1b6ad3d7ea930211dc0d06fadca1e8 Mon Sep 17 00:00:00 2001 From: owenpearson Date: Tue, 12 Dec 2023 16:45:53 +0000 Subject: [PATCH] feat: add support for fcm v1 credentials --- app.go | 8 ++++++++ client_test.go | 2 ++ 2 files changed, 10 insertions(+) diff --git a/app.go b/app.go index f9f2945..9042e44 100644 --- a/app.go +++ b/app.go @@ -13,6 +13,10 @@ type NewApp struct { TLSOnly bool `json:"tlsOnly"` // The Firebase Cloud Messaging key. FcmKey string `json:"fcmKey"` + // The Firebase Service Account key. To use the service account key you must also provide a projectId. + FcmServiceAccount string `json:"fcmServiceAccount"` + // The Firebase Project ID. To authenticate with firebase you must also provide a service account key. + FcmProjectId string `json:"fcmProjectId"` // The Apple Push Notification service certificate. // This field can only be used to set a new value, // it will not be populated by queries. @@ -40,6 +44,10 @@ type App struct { TLSOnly bool `json:"tlsOnly"` // The Firebase Cloud Messaging key. FcmKey string `json:"fcmKey"` + // The Firebase Service Account key. To use the service account key you must also provide a projectId. + FcmServiceAccount string `json:"fcmServiceAccount"` + // The Firebase Project ID. To authenticate with firebase you must also provide a service account key. + FcmProjectId string `json:"fcmProjectId"` // The Apple Push Notification service certificate. // This field can only be used to set a new value, // it will not be populated by queries. diff --git a/client_test.go b/client_test.go index 7a9bfc5..84d8347 100644 --- a/client_test.go +++ b/client_test.go @@ -49,6 +49,8 @@ func newTestApp(t *testing.T, client *Client) App { Status: "enabled", //TLSOnly: false, FcmKey: "", + FcmServiceAccount: "", + FcmProjectId: "", ApnsCertificate: "", ApnsPrivateKey: "", ApnsUseSandboxEndpoint: false,