AppCheck when using Realtime Database REST API #7832
-
Hi all 👋, there are times in my app where I do not want the offline write capability that the RTDB client SDK offers. I'd prefer to use the REST API and immediately handle any issues with network connectivity, timeouts, permission failures, etc. The thing that the client SDK does that I want is automatically fetching and refreshing tokens and providing them in the right place on these API calls, including the AppCheck token. Has anyone tried using the RNFB |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Reporting back in case anyone else searches for this. You can indeed send an AppCheck token using the REST API. All you have to do is request an AppCheck token, and supply it in the request header |
Beta Was this translation helpful? Give feedback.
Reporting back in case anyone else searches for this. You can indeed send an AppCheck token using the REST API. All you have to do is request an AppCheck token, and supply it in the request header
X-Firebase-AppCheck
. Seems to work great, don't forget to also supply the users ID token with the?auth=
query string parameter too.