Cloud Authentication
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.confirm_passwordreset — Function
confirm_passwordreset(oobcode="", newpassword="")
Confirm a password reset. Applies newpassword to the account identified by the out-of-band code from the reset email.
Firebase.firebase_changeemail — Function
firebasechangeemail(newemail="",firebaseidtoken= FIREBASEID_TOKEN)
Change email You can change a user's email by issuing an HTTP POST request to the Auth setAccountInfo endpoint.
Example
julia data = firebase_signin("user@example.com,"helloworld!!") firebase_changeemail("user@example.com",data["idToken"]) data = firebase_signin("user@example.com,"helloworld!!") firebase_changeemail("user@example.com",data["idToken"])`
Firebase.firebase_changepassword — Function
firebasechangepassword(newpassword="", firebaseidtoken=FIREBASEID_TOKEN)
Change password You can change a user's password by issuing an HTTP POST request to the Auth setAccountInfo endpoint.
Example
julia data = firebase_signin("user@example.com","helloworld!!") firebase_changepassword("hellopaaji!!",data["idToken"]) data = firebase_signin("user@example.com","hellopaaji!!") firebase_changepassword("helloworld!!",data["idToken"])`
Firebase.firebase_confirmemailverify — Function
firebaseconfirmemailverify(verificationcode="")
Confirm email verification using the out-of-band code from the verification email.
Firebase.firebase_deleteuser — Function
firebasedeleteuser(firebaseidtoken=FIREBASEID_TOKEN)
Delete account You can delete a current user by issuing an HTTP POST request to the Auth deleteAccount endpoint.
Example
data = firebase_signup("user@example.com","hello!!123")
firebase_deleteuser(data["idToken"])Firebase.firebase_fetchproviders — Method
firebase_fetchproviders(email; continueuri="http://localhost")
Fetch providers for email You can look all providers associated with a specified email by issuing an HTTP POST request to the Auth createAuthUri endpoint.
Example
julia> firebase_fetchproviders("user@example.com")
#=
Dict{String, Any} with 5 entries:
"allProviders" => Any["password"]
"kind" => "identitytoolkit#CreateAuthUriResponse"
"sessionId" => "k8iBdCSLEeAbhhgKz6E4PC-ltCs"
"signinMethods" => Any["password"]
"registered" => true
=#Firebase.firebase_getuserinfo — Function
firebasegetuserinfo(firebaseidtoken=FIREBASEID_TOKEN)
Get user data You can get a user's data by issuing an HTTP POST request to the Auth getAccountInfo endpoint.
Example
data = firebase_signin("user@example.com","helloworld!!")
firebase_getuserinfo(data["idToken"])Firebase.firebase_linkoauth — Method
Link with OAuth credential You can link an OAuth credential to a user by issuing an HTTP POST request to the Auth verifyAssertion endpoint.
Firebase.firebase_linkuserinfo — Function
Link with email/password You can link an email/password to a current user by issuing an HTTP POST request to the Auth setAccountInfo endpoint.
Example
data = firebase_signin("user@example.com","helloworld!!")
firebase_linkuserinfo("ash@gmail.com", "hello!!123as",data["idToken"])
data = firebase_signin("ash@gmail.com", "hello!!123as")
firebase_linkuserinfo("user@example.com","helloworld!!",data["idToken"])Firebase.firebase_passwordreset — Method
firebase_passwordreset(email)
Send password reset email You can send a password reset email by issuing an HTTP POST request to the Auth getOobConfirmationCode endpoint.
Example
firebase_passwordreset("user@example.com")
# email will recieve the reset password emailFirebase.firebase_signin — Function
firebase_signin(email::String="data", password::String="data", returnSecureToken::Bool= true)
Sign in with email / password You can sign in a user with an email and password by issuing an HTTP POST request to the Auth verifyPassword endpoint.
Example
firebase_signin("user@example.com" , "hello1231!!")
#=
Dict{String, Any} with 8 entries:
"refreshToken" => "AGEhc0C1F9smilhBPdT5TYClumCwdzGI9q43s5r-MsqW-bJTeiIw1doG7zRF_VMX2a0WELR3zRB…
"kind" => "identitytoolkit#VerifyPasswordResponse"
"localId" => "zgrI4g3ualVJW7IEiRlPFg5jItA2"
"displayName" => ""
"idToken" => "eyJhbGciOiJSUzI1NiIsImtpZCI6ImRjNGQwMGJjM2NiZWE4YjU0NTMzMWQxZjFjOTZmZDRlNjd…
"registered" => true
"expiresIn" => "3600"
"email" => "user@example.com"
=#Firebase.firebase_signinanon — Function
firebase_signinanon(returnSecureToken::Bool= true)
Sign in anonymously You can sign in a user anonymously by issuing an HTTP POST request to the Auth signupNewUser endpoint.
Exampleemail::String="", password::String="",
julia> firebase_signinanon()
#=
Dict{String, Any} with 5 entries:
"refreshToken" => "AGEhc0DiE1zelLdCW2KG9wMRwZKcZI6EuSef4hsIc6uOZp0I3SYUTf0Hib_XgvtgY1yeqgFNqJ0…
"kind" => "identitytoolkit#SignupNewUserResponse"
"localId" => "3T8r7DD99zO9qKL1k56boC2iiXF2"
"expiresIn" => "3600"
"idToken" => "eyJhbGciOiJSUzI1NiIsImtpZCI6ImRjNGQwMGJjM2NiZWE4YjU0NTMzMWQxZjFjOTZmZDRlNjd…
=#Firebase.firebase_signinoauth — Function
firebasesigninoauth(idtoken, provider="google.com")
Sign in with OAuth credential You can sign in a user with an OAuth credential by issuing an HTTP POST request to the Auth verifyAssertion endpoint.
This doesn't work today
Example
firebase_signinoauth("[GOOGLE_ID_TOKEN]")Firebase.firebase_signup — Function
firebase_signup(email::String="", password::String="", returnSecureToken::Bool= true)
Sign up with email / password You can create a new email and password user by issuing an HTTP POST request to the Auth signupNewUser endpoint.
Example
set_webapikey("WEB_API_KEY")
firebase_signup("user@example.com","hello!!")
#=
Dict{String, Any} with 6 entries:
"refreshToken" => "AGEhc0AjgXJevwy_rkJ3r4VUHc4EEORngVF-rwEtOuO007AymRqbAzVnn1iAMCZNHqzwnCI1X8fkJ0OPE2fTuGN7ameU6P7SmibwIFs8sOZxUI8C_uklOkk1IG5DFdWXAC45mK_0Hy4tuJXJUvI8Kuy6LS-GERZ5Bc…
"kind" => "identitytoolkit#SignupNewUserResponse"
"localId" => "GRCBj28Pkhat0mYsJS0BVrlVmJd2"
"expiresIn" => "3600"
"idToken" => "eyJhbGciOiJSUzI1NiIsImtpZCI6ImRjNGQwMGJjM2NiZWE4YjU0NTMzMWQxZjFjOTZmZDRlNjdjNTFlODkiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vZmlyLWp…
"email" => "user@example.com"
=#Firebase.firebase_unlinkprovide — Function
Unlink provider You can unlink a provider from a current user by issuing an HTTP POST request to the Auth setAccountInfo endpoint.
Example
set_webapikey("[WEB_API_KEY]")
data = firebase_signup("user@example.com","hello!!123")
#=
Dict{String, Any} with 6 entries:
"refreshToken" => "AGEhc0A4Y-wFC0S2Cub-7TY2XNfZMYQf-YKzTdQWl9_SjrRpUW4d3QymQy5P1EN4Me8-SE695sPE_MBXoMoqTzKLy76nBvDGmybGmP4wnWLyrJql-HfoVPRtG1emeJ3E61DnDbUIZOvV-Y3GuzpJ57XZojHBM1aoMp…
"kind" => "identitytoolkit#SignupNewUserResponse"
"localId" => "neXn8Mg562VFgENRtA2SEC0NEBk1"
"expiresIn" => "3600"
"idToken" => "eyJhbGciOiJSUzI1NiIsImtpZCI6ImRjNGQwMGJjM2NiZWE4YjU0NTMzMWQxZjFjOTZmZDRlNjdjNTFlODkiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vZmlyLWp…
"email" => "user@example.com"
=#
firebase_unlinkprovide(data["idToken"], "google.com")
#=
Dict{String, Any} with 6 entries:
"kind" => "identitytoolkit#SetAccountInfoResponse"
"localId" => "neXn8Mg562VFgENRtA2SEC0NEBk1"
"passwordHash" => "UkVEQUNURUQ="
"emailVerified" => false
"providerUserInfo" => Any[Dict{String, Any}("rawId"=>"user@example.com", "providerId"=>"password", "federatedId"=>"user@example.com", "email"=>"user@example.com")]
"email" => "user@example.com"
=#Firebase.firebase_updateprofile — Function
Update profile You can update a user's profile (display name / photo URL) by issuing an HTTP POST request to the Auth setAccountInfo endpoint.
TODO: delete attribute
Example
julia data = firebase_signin("user@example.com","helloworld!!") firebase_updateprofile("ash","https://i.imgur.com/zgDkgSR.jpeg",data["idToken"]) #= Dict{String, Any} with 8 entries: "kind" => "identitytoolkit#SetAccountInfoResponse" "photoUrl" => "https://i.imgur.com/zgDkgSR.jpeg" "localId" => "GovyExPqFWS70uynnuBzVnYgLAi2" "displayName" => "ash" "passwordHash" => "UkVEQUNURUQ=" "emailVerified" => false "providerUserInfo" => Any[Dict{String, Any}("rawId"=>"user@example.com", "photoUrl"=>"https:… "email" => "user@example.com" =#
Firebase.firebase_verifyemail — Function
firebaseverifyemail(firebaseidtoken=FIREBASEID_TOKEN)
Send email verification You can send an email verification for the current user by issuing an HTTP POST request to the Auth getOobConfirmationCode endpoint.
Example
data = firebase_signin("user@example.com","helloworld!!")
firebase_verifyemail((data["idToken"])Firebase.set_webapikey — Method
set_webapikey(key)
Sets the project's Web API key, used by every Firebase Auth call. Find it under Project settings → General in the Firebase console.
Example
set_webapikey("asjdlajsj1j32lj312")Firebase.verify_passwordresetcode — Function
verify_passwordresetcode()
Verify password reset code You can verify a password reset code by issuing an HTTP POST request to the Auth resetPassword endpoint.
Example