SubscribeToTopic() results in 401

Aperta
#439 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
csharp

Direzione di ricerca

Inizia riproducendo il problema tramite FirebaseApp.Create, FirebaseMessaging.GetMessaging e SubscribeToTopicAsync con la configurazione documentata di Ubuntu, .NET, SDK e federazione dei workload. Confronta l’autenticazione e la configurazione del progetto utilizzate per la sottoscrizione al topic con il percorso di invio dei messaggi che ha esito positivo. Il lavoro è completato quando SubscribeToTopicAsync accetta il token del dispositivo e il topic senza restituire 401.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

needs-triage
[READ] Step 1: Are you in the right place?
  • For issues related to the code in this repository file a Github issue.
  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • For help troubleshooting your application that does not fall under one
    of the above categories, reach out to the personalized
    Firebase support channel.
[REQUIRED] Step 2: Describe your environment
  • Operating System version: Ubuntu 22.04.5 LTS
  • Firebase SDK version: 3.1.0
  • Firebase Product: Firebase Cloud Messaging
  • .NET version: 8.0.10
  • OS: Ubuntu
[REQUIRED] Step 3: Describe the problem

We have 2 projects on GCP, project A is used to host workloads on GKE, and project B is set with Firebase
We have a service/api that will handle notifications requests from client apps and will send them to FCM.
The authentication is done via ACD and workload federation, the SAs are given all permissions required.
We are able to send notification and data messages to the devices, but when we send a subscribe to topic request we get 401

Steps to reproduce:
  1. intiialize the default instace for the app,
  2. get the messaging service
  3. use SubscribeToTopicAsync to subscribe a device/s to topic
Relevant Code:
FirebaseApp app = FirebaseApp.Create(
new AppOptions
    {
        ProjectId = firebase_project_id,
        Credential = GoogleCredential.GetApplicationDefault(),
    });
var firebaseMessaging= FirebaseMessaging.GetMessaging(app);

TopicManagementResponse response = firebaseMessaging
                                                    .SubscribeToTopicAsync(new[] { "device_token" }, "test_topic")
                                                    .GetAwaiter()
                                                    .GetResult();

Lingua principale
C#
Stelle
408
Fork
147
Merge medio
1g 3h
PR unite (30g)
10

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di firebase/firebase-admin-dotnet

Tutte le issue di firebase/firebase-admin-dotnet

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.