You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am submitting this issue as a bug related to the documentation because it believe it is important.
On the web, when obtaining an FCM token through the API (getToken), it is unclear, by reading the documentation, if the returned token is guaranteed to be the same for all tabs running the same page, on the same domain. Opening multiple tabs on the same page is a common scenario and nothing in the documentation states whether or not the same token will be returned. The behavior of the code will drastically need to be adapted if different token might be returned.
Note that I am not talking about the fact that the same token may be returned at a later time, eg. if the user closes its browser and then reopens it later.
Steps and code to reproduce issue
create a JavaScript web page with Firebase set up and that just gets an FCM token
open the same page in a second tab and repeat the process. Compare the returned token IDs. Are they guaranteed to be equal? My understanding is that they are, assuming of course no token refresh event took place before the token was requested the second time. Rationale: all tabs share a single (unique) instance of the service worker, which itself has a token bound to it.
The text was updated successfully, but these errors were encountered:
Operating System
All
Environment (if applicable)
Chrome
Firebase SDK Version
All
Firebase SDK Product(s)
Messaging
Project Tooling
Plain JavaScript
Detailed Problem Description
I am submitting this issue as a bug related to the documentation because it believe it is important.
On the web, when obtaining an FCM token through the API (getToken), it is unclear, by reading the documentation, if the returned token is guaranteed to be the same for all tabs running the same page, on the same domain. Opening multiple tabs on the same page is a common scenario and nothing in the documentation states whether or not the same token will be returned. The behavior of the code will drastically need to be adapted if different token might be returned.
Note that I am not talking about the fact that the same token may be returned at a later time, eg. if the user closes its browser and then reopens it later.
Steps and code to reproduce issue
The text was updated successfully, but these errors were encountered: