Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for fcm v1 credentials #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ func newTestApp(t *testing.T, client *Client) App {
Status: "enabled",
//TLSOnly: false,
FcmKey: "",
FcmServiceAccount: "",
FcmProjectId: "",
ApnsCertificate: "",
ApnsPrivateKey: "",
ApnsUseSandboxEndpoint: false,
Expand Down
Loading