FCM HTTP v1:如何使用Go获取访问令牌?

问题描述 投票:0回答:1

要使用Go发送Firebase Cloud Messaging,我们需要将访问令牌放在HTTP请求标头中。

在Firebase文档中,有关于如何使用Node.JS,Python和Java检索访问令牌的示例:

https://firebase.google.com/docs/cloud-messaging/auth-server

任何人都可以使用Go显示获取访问令牌吗?

似乎有许多关于Firebase / Google身份验证的Go包。理解应该使用哪些是非常令人困惑的:

  • firebase.Google.com/go
  • firebase.Google.com/go/AU TH
  • GitHub.com/firebase/firebase-admin-go
  • Google.go浪.org/API/option
  • go浪.org/小/OAuth2
  • go浪.org/小/OAuth2/Google
  • GitHub.com/Google/Google-API-go-client
firebase go google-api firebase-authentication firebase-cloud-messaging
1个回答
1
投票

我正在使用go firebase SDK来添加FCM HTTP v1。

现在它几乎完成了,我必须编写测试和集成测试,你可以在这里查看代码:https://github.com/chemidy/firebase-admin-go/tree/fcm/messaging

我将在下周完成测试并发送PR,(在ios + android + web上测试有点棘手)

© www.soinside.com 2019 - 2024. All rights reserved.