firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.74k stars 3.98k forks source link

[firebase-messaging ] [web] - getToken() prompts notification permission in web #16817

Open bf-vs opened 11 hours ago

bf-vs commented 11 hours ago

Is there an existing issue for this?

Which plugins are affected?

In-App Messaging

Which platforms are affected?

Web

Description

The current behavior of getToken() on web prompts the user with a permission dialog if notification permissions have not already been granted.

In comparison, the behavior on mobile platforms is already ideal, as getToken() operates silently regardless of the user's notification permission status. It returns null if the permission is not given.

Reproducing the issue

Firebase Core version

3.8.0

Flutter Version

3.24.5

Relevant Log Output

No response

Flutter dependencies

No response

Additional context and comments

No response

SelaseKay commented 10 hours ago

Hi @bf-vs, thanks for the report. However, I'm not entirely sure about your concern. Could you please clarify what you believe the expected behavior should be on the web?