Package Exports
- web-firebase
- web-firebase/dist/index.js
- web-firebase/dist/index.modern.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (web-firebase) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
web-firebase
This library makes you to execute some Firebase web authentication processes easily.
Install
npm install web-firebaseUsage
import { useFirebase, initialize } from 'web-firebase'First, execute 'initialize' method with your web app's Firebase configuration to get 'auth' variable.
const firebaseConfig = {
apiKey: 'API_KEY',
authDomain: 'PROJECT_ID.firebaseapp.com',
databaseURL: 'https://DATABASE_NAME.firebaseio.com',
projectId: 'PROJECT_ID',
storageBucket: 'PROJECT_ID.appspot.com',
messagingSenderId: 'SENDER_ID',
appId: 'APP_ID'
}
const auth = initialize(firebaseConfig)And then, you can use useFirebase hook with this "auth" variable.
const {
userInfo, // User's authentication info
createUser,
signIn,
userObserver,
logOut,
updateUserProfile,
googleAuth
error // Error string variable
} = useFirebase(auth)License
MIT © erol1098
Keywords
Firebase, authentication