-
Notifications
You must be signed in to change notification settings - Fork 70
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
Support FCM changes #762
Support FCM changes #762
Conversation
handlers/firebase/handler.go
Outdated
|
||
sendURL := fmt.Sprintf("https://fcm.googleapis.com/v1/projects/%s/messages:send", fcmAuthJSON["project_id"]) | ||
|
||
ts, err := idtoken.NewTokenSource(ctx, sendURL, option.WithCredentialsJSON([]byte(fcmAuthJSONString))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the credentials JSON to make a token source and we use REST API for the requests with the Bearer access token
https://cloud.google.com/docs/authentication/get-id-token#go
fe02db5
to
33d97fe
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #762 +/- ##
==========================================
+ Coverage 75.88% 76.11% +0.23%
==========================================
Files 111 111
Lines 10394 10699 +305
==========================================
+ Hits 7887 8144 +257
- Misses 1788 1825 +37
- Partials 719 730 +11 ☔ View full report in Codecov by Sentry. |
No description provided.