gappsapps_tech

Init

// Initialize
firebase.initializeApp(config)
// App
firebase.app()
// Get app name
firebase.app().name

Authentication

// Sign in pre-build UI
ui.start(element, options)
// Auth
firebase.auth()
// Create user with email and password
firebase.auth().createUserWithEmailAndPassword(email, password)
// Sign in with email and password
firebase.auth().signInWithEmailAndPassword(email, password)
// On auth state changed
firebase.auth().onAuthStateChanged(user)
// Current user
firebase.auth().currentUser
// Auth providers data
user.providerData
// Update profile
user.updateProfile({ displayName, photoURL})
// Update email
user.updateEmail(email)
// Send email verification
user.sendEmailVerification()
// Set auth language for emails
firebase.auth().languageCode = 'fr'
// Use device language
firebase.auth().useDeviceLanguage()
// Update password
user.updatePassword(newPassword)
// Send password reset email
firebase.auth().sendPasswordResetEmail(email)
// Delete user
user.delete()
// Re-authenticate user
user.reauthenticateWithCredential(credential)
// Sign out
firebase.auth().signOut()

Database

// Database
firebase.database()

Storage

// Storage
firebase.storage()
Edit this page on GitHub