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
In our ongoing efforts to provide users with a seamless and consistent experience across multiple devices, we are excited to introduce an innovative approach to managing Firebase Cloud Messaging (FCM) tokens and apptokens. This enhanced system ensures that notifications are delivered accurately and efficiently to the right devices while respecting user preferences.
Array of FCM Tokens and Apptokens:
Traditionally, managing FCM tokens for user notifications involved storing a single token associated with each user. However, with the rise of multi-device usage, this approach presented challenges. Users now expect notifications to seamlessly transition across devices as they interact with our application. To address this, we have developed an array-based approach.
During Signup and Login:
FCM Token Generation: When a user signs up or logs in from a new device or browser, we automatically generate a new FCM token for that specific session.
Apptoken Creation: Simultaneously, we generate a unique app-specific token (apptoken) for the user's device or browser session.
Array Storage: Both the newly generated FCM token and apptoken are then added to an array of tokens associated with the user's profile. This array acts as a repository for all tokens related to the user's devices and sessions.
Logout and Token Management:
Token Removal: Whenever a user logs out or a token becomes invalid (e.g., due to expiration or device/browser removal), we promptly remove the corresponding FCM token and apptoken from the user's token array.
Sending Notifications:
Array Iteration: When we send notifications, we iterate through the array of FCM tokens and apptokens associated with the user.
Efficient Delivery: Notifications are sent to all valid tokens present in the array, ensuring that notifications reach all devices and browsers the user has used our application on.
Frontend Handling:
Conditional Display: On the frontend, we implement a condition check to determine if the apptoken exists in the user's cookies before displaying notifications.
Personalized Experience: If the apptoken is present, notifications are displayed, guaranteeing they are shown exclusively on personal devices where the user is logged in.
The text was updated successfully, but these errors were encountered:
In our ongoing efforts to provide users with a seamless and consistent experience across multiple devices, we are excited to introduce an innovative approach to managing Firebase Cloud Messaging (FCM) tokens and apptokens. This enhanced system ensures that notifications are delivered accurately and efficiently to the right devices while respecting user preferences.
Array of FCM Tokens and Apptokens:
Traditionally, managing FCM tokens for user notifications involved storing a single token associated with each user. However, with the rise of multi-device usage, this approach presented challenges. Users now expect notifications to seamlessly transition across devices as they interact with our application. To address this, we have developed an array-based approach.
During Signup and Login:
Logout and Token Management:
Sending Notifications:
Frontend Handling:
The text was updated successfully, but these errors were encountered: