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
Currently, the putClientSettings endpoint that's part of the v1 API is available in the v2 backend as a HTTPS Cloud Function. However, that doesn't track with how we'd like to client-backend interaction; we'd like to move towards direct use of Firestore by the client, without a custom API layer in between.
In addition, the FCM token being updated through this call (its reason for existing) isn't currently being used - we should discuss the future of this functionality.
Desired Solution
We'd like to:
Discuss whether the FCM token logic has a reason to exist in the project, or whether we should remove this functionality entirely. If the FCM token won't have a use at all, we should remove this functionality instead of doing the things below. If the FCM token does have a use...
Replace the putClientSettings API with direct Firestore access.
Implement the clientSettingsUpdated Cloud Function with the logic to use the FCM token as desired.
Additional Context
Cloud Functions live in app/server/functions/src/index.ts.
To allow for direct access to Firestore, we will need to update our firestore.rules. Please also update the unit tests in firestore_rules.spec.ts to show what clients should and should not be allowed to do under the new rules.
The text was updated successfully, but these errors were encountered:
Before this PR, we would update the client's FCM token by writing to the putClientSettings HTTPS endpoint. With this PR, we remove that intermediate API layer and write directly to Firestore.
We don't currently use the FCM token, so the main purposes of this PR are to...
* Demonstrate how we'll perform direct Firestore access.
* Demonstrate how to configure the app to use the local Firebase (Firestore) emulator.
* Prepare the application for later use of the FCM token.
Closes#1973
Summary
Currently, the
putClientSettings
endpoint that's part of thev1
API is available in thev2
backend as a HTTPS Cloud Function. However, that doesn't track with how we'd like to client-backend interaction; we'd like to move towards direct use of Firestore by the client, without a custom API layer in between.In addition, the FCM token being updated through this call (its reason for existing) isn't currently being used - we should discuss the future of this functionality.
Desired Solution
We'd like to:
putClientSettings
API with direct Firestore access.clientSettingsUpdated
Cloud Function with the logic to use the FCM token as desired.Additional Context
Cloud Functions live in
app/server/functions/src/index.ts
.To allow for direct access to Firestore, we will need to update our
firestore.rules
. Please also update the unit tests infirestore_rules.spec.ts
to show what clients should and should not be allowed to do under the new rules.The text was updated successfully, but these errors were encountered: