Firebase Auth doesn't provide customised user roles, so this boilerplate project uses Firebase Firestore to create and manage users on top of the Firebase Auth.
When a user is logged in, selected details are matched against a record in Firebase Firestore and stored in Vuex state, which can be accessessed from anywhere in the app.
You'll need a free Firebase account.
- Clone the repo
git clone https://github.com/michaelzero00/VueFirebaseUserManagement.git
- Install NPM packages
npm install
- Start a new Firebase project and enable Firebase Auth (at least the email and password option) and Firebase Firestore.
- Copy your project settings from the Project Overview => Firebase SDK snippet => Config screen
- Rename
src/firebase/firebaseInit_template.jstosrc/firebase/firebaseInit.jsand enter your details from step 4. - Run
npm run serve