Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Notification Permission and FCM Token Handling #2724

Closed
5 tasks done
Tracked by #1055
Ayush8923 opened this issue Dec 16, 2024 · 0 comments · Fixed by #2737
Closed
5 tasks done
Tracked by #1055

Implement Notification Permission and FCM Token Handling #2724

Ayush8923 opened this issue Dec 16, 2024 · 0 comments · Fixed by #2737
Assignees
Labels
Type: Feature new user-facing feature
Milestone

Comments

@Ayush8923
Copy link
Contributor

Ayush8923 commented Dec 16, 2024

Objective
Implement functionality for handling notification permissions and managing FCM tokens in the application.

Proposed Solutions & Alternatives

  • Request Notification Permission

    • Prompt the user for notification permission.
  • Fetch FCM Token

    • Retrieve the Firebase Cloud Messaging (FCM) token, which is unique for each device.
  • Backend Registration

    • Register the FCM token with the backend using the API:
      • Endpoint: POST /api/v1/notification/device
      • Request Body:
        {
           "fcmToken": "string",
           "deviceName": "string" // optional
        }
  • Store FCM Token in a Cookie

    • Save the FCM token in a cookie for persistence.
  • Prevent Redundant Token Generation

    • Ensure that the app continues to use the existing FCM token if the newly generated FCM token is identical. In this case, the backend API call is not triggered.
    • Re-register the service worker using the saved token if needed.
@Ayush8923 Ayush8923 added the Type: Feature new user-facing feature label Dec 16, 2024
@github-project-automation github-project-automation bot moved this to Triage / Analysis in All Tasks & Issues Dec 16, 2024
@Ayush8923 Ayush8923 moved this from Triage / Analysis to Planned (current "sprint") in All Tasks & Issues Dec 16, 2024
@Ayush8923 Ayush8923 self-assigned this Dec 16, 2024
@Ayush8923 Ayush8923 added this to the Notifications milestone Dec 16, 2024
@Ayush8923 Ayush8923 moved this from Planned (current "sprint") to In Progress in All Tasks & Issues Dec 17, 2024
@Ayush8923 Ayush8923 linked a pull request Dec 18, 2024 that will close this issue
5 tasks
@Ayush8923 Ayush8923 moved this from In Progress to Technical Review in All Tasks & Issues Dec 18, 2024
@sleidig sleidig moved this from Technical Review to In Progress in All Tasks & Issues Dec 19, 2024
@Ayush8923 Ayush8923 moved this from In Progress to Technical Review in All Tasks & Issues Dec 19, 2024
@sleidig sleidig closed this as completed Dec 19, 2024
@github-project-automation github-project-automation bot moved this from Technical Review to Done in All Tasks & Issues Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature new user-facing feature
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants