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

Support FCM changes #762

Merged
merged 3 commits into from
Jul 29, 2024
Merged

Support FCM changes #762

merged 3 commits into from
Jul 29, 2024

Conversation

norkans7
Copy link
Contributor

No description provided.


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)))
Copy link
Contributor Author

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

Copy link

codecov bot commented Jul 24, 2024

Codecov Report

Attention: Patch coverage is 60.20408% with 39 lines in your changes missing coverage. Please review.

Project coverage is 76.11%. Comparing base (8284e47) to head (07637d0).
Report is 6 commits behind head on main.

Files Patch % Lines
handlers/firebase/handler.go 60.20% 31 Missing and 8 partials ⚠️
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.
📢 Have feedback on the report? Share it here.

@norkans7 norkans7 marked this pull request as ready for review July 26, 2024 09:48
@norkans7 norkans7 changed the title Use google auth token source to generate bearer tokens Support FCM changes Jul 26, 2024
@rowanseymour rowanseymour merged commit 160c188 into main Jul 29, 2024
6 of 7 checks passed
@rowanseymour rowanseymour deleted the firebase-tokens branch July 29, 2024 15:53
@github-actions github-actions bot locked and limited conversation to collaborators Jul 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants