Using the cloud variables is awesome to interact with firebase. BUT we cant do PATCH requests. I cant easily modify 1 property of 1 object that I have saved. it would make sense to just use the API request then to accomplish what the cloud variable doesnt. BUT my DB has rules ground down to the user bucket meaning each user can only modify their own bucket.
this again is fine for most use cases but not PATCH. When patching my url needs to look something like this
https://docs-examples.firebaseio.com/rest/saving-data/users/alanisawesome.json?auth=<idToken>
at first, i thought this was the user id but it isnt. it is the token provided by firebase upon login which changes every time a user logs in or after some period of time.
This means you cant use both together because you have to sign in and get the token at the sign of login.
is there any way we can get another block to not only get the userID but also the token.
otherwise i plan to use the API for everything in my app and that makes me cry a little. (not really) it’ll just be more work
an API response example
{
"kind": "identitytoolkit#VerifyPasswordResponse",
"localId": <THIS IS THE VALUE RETURNED FROM THE GREEN userID FIREBASE BLOCK,
"email": "jared.gibb@gmail.com",
"displayName": "",
"idToken": "eyJhbGciOiJSUzI1NiIsImtpZCI6InRCME0yQSJ9.eyJpc3MiOiJodHRwczovL2lkZW50aXR5dG9vbGtpdC5nb29nbGUuY29tLyIsImF1ZCI6ImxvZ2luLWRhdGFiYXNlLWJyYyIsImlhdCI6MTYwODMyNzM1MiwiZXhwIjoxNjA5NTM2OTUyLCJ1c2VyX2lkIjoiNGpWMzlhRUs2ak9lY0xkS09OSk1LYXRzRVluMSIsImVtYWlsIjoiamFyZWQuZ2liYkBnbWFpbC5jb20iLCJzaWduX2luX3Byb3ZpZGVyIjoicGFzc3dvcmQiLCJ2ZXJpZmllZCI6dHJ1ZX0.sO9_pyf5-4byfIPC633GrabVjr81HNd2qoxy1kdpAY9yx9MbMtmcTVWYr3MFmUg68zkAqOux9Zsmy_o270Wb3cVpP8DDRbmJnscV7pua0J-0AOfF7F3tPEc3wdNeopMF7uCfrBBk5NCE4hOM0jucG6NvQnjNIiMU7PKQC7aGe0XCYBE9eI5zsMW6kfPZuXFdCKXLzdxETxm8i6uT38yotf3BnQ03XezgKCOjmcS0HX8-nhSKClpo4pTygfroP6NDFuQhRuETxPkd5fW6qYwPXwja8TARg3-3CG3NQz0yGE9lW_2gP2Zbo1B5oYZwEsE4sFgBZodphz81vn88gQirzA",
"registered": true
}