vue-firebase

Vue Firebase
1,691 2
Install
npm install vue-firebase
Latest Version:1.0.8
License:MIT
Last Updated:Oct 24, 2017
Links: GitHub  ·  npm
Maintainer: component17

Dependencies

  • vue-router
  • firebase

Install

Step 1

npm install vue-firebase --save
or
yarn add vue-firebase

Step 2

add main.js

import * as firebase from "firebase";       
import VueFirebase from 'vue-firebase'

// Config firebase project
const FBCONFIG = {
    apiKey: "xxx",
    authDomain: "xxx",
    databaseURL: "xxx",
    projectId: "xxx",
    storageBucket: "xxx",
    messagingSenderId: "xxx"
};

Vue.use(VueFirebase, {firebase: firebase, config: FBCONFIG});

Component Injections

this.$firebase The firebase instance.

Easy check Auth routes

If you want to check the route, just add the meta and define the redirect

    {
        path: '/',
        name: 'Hello',
        component: HelloWorld
    },
    {
        path: '/test',
        name: 'Test',
        component: test,
        meta: { requiresAuth: false }
    },
    {
        path: '/dashboard',
        name: 'Dashboard',
        component: dashboard,
        meta: { requiresAuth: true, redirect: "/" }
    }

Related Packages

@amoutonbrady/nuxt-firebase-auth-lite

Nuxt integration for firebase-auth-lite

1,097 1
@enso-ui/auth

Authentication pages, auth store helpers, and password-strength utilities for En...

11,552 0
@e-chan1007/nuxt-firebase

Integrate Firebase With Nuxt (3)

661 5

Version History

Version Released License
1.0.8 MIT
1.0.7 MIT
1.0.6 MIT
1.0.5 MIT
1.0.4 MIT