Utility Functions
Firebase.auth_headerFirebase.auth_urlFirebase.cloudstore_addfirebaseFirebase.cloudstore_getFirebase.cloudstore_getbucketFirebase.cloudstore_initFirebase.cloudstore_listbucketsFirebase.cloudstore_removefirebaseFirebase.cloudstore_sendfileFirebase.confirm_passwordresetFirebase.content_typeFirebase.database_nsFirebase.emulator_activeFirebase.emulator_runningFirebase.firebase_changeemailFirebase.firebase_changepasswordFirebase.firebase_confirmemailverifyFirebase.firebase_deleteuserFirebase.firebase_fetchprovidersFirebase.firebase_getuserinfoFirebase.firebase_linkoauthFirebase.firebase_linkuserinfoFirebase.firebase_passwordresetFirebase.firebase_signinFirebase.firebase_signinanonFirebase.firebase_signinoauthFirebase.firebase_signupFirebase.firebase_unlinkprovideFirebase.firebase_updateprofileFirebase.firebase_verifyemailFirebase.firestore_batchgetFirebase.firestore_batchwriteFirebase.firestore_beginTransactionFirebase.firestore_commitFirebase.firestore_createdocFirebase.firestore_deletedocFirebase.firestore_getcollectionidsFirebase.firestore_getdoclistFirebase.firestore_partitionqueryFirebase.firestore_patchFirebase.firestore_runqueryFirebase.firestore_urlFirebase.get_requestFirebase.get_tokenFirebase.initFirebase.initparsedjsonFirebase.realdb_deleteFirebase.realdb_downloadFirebase.realdb_getFirebase.realdb_initFirebase.realdb_patchFirebase.realdb_postFirebase.realdb_putFirebase.set_webapikeyFirebase.use_emulatorFirebase.use_productionFirebase.verify_passwordresetcode
Firebase.auth_header — Function
auth_header(service=:firestore)"Authorization" => ... header for a request to service. When that service is pointed at the emulator, the emulator's fixed owner token is used and no OAuth call is made. Any other service, including :management (the Storage management API, which has no emulator), gets a real service-account token, so emulating one service never sends the fake token to a live one.
Firebase.get_token — Method
get_token()Return an OAuth access token for the loaded service account. The token is cached and reused until shortly before it expires, so repeated calls are cheap.
Firebase.init — Method
init( julianparseddict::AbstractDict)Initialize if the sdk key is in Julia dict format.
Example
```md julia> r = HTTP.get(BASE_URL, header); # returns a response with header and body HTTP.Messages.Response
julia> response = JSON.parse(String(r.body)) Dict{String, Any} with 10 entries: "clientemail" => "****" "clientid" => "****" "authuri" => "https://accounts.google.com/o/oauth2/auth" "authproviderx509certurl" => "https://www.googleapis.com/oauth2/v1/certs" "tokenuri" => "https://oauth2.googleapis.com/token" "clientx509certurl" => "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-jk50g%40volka-bot.iam.gserviceaccount.com" "projectid" => "****" "type" => "serviceaccount" "privatekey" => "****" "privatekeyid" => "****"
julia> init(response) ````
Firebase.initparsedjson — Method
initparsedjson(jsonstring)Initialize from a service-account key given as a JSON string, e.g. one read from an environment variable or a secret manager. The key is parsed in memory and never written to disk.
Example
julia> initparsedjson(ENV["FIREBASE_ADMIN_SDK_JSON"])