Authenticating to the ProFitOro application

Let us now make signing in and logging in to our ProFitOro application possible! First, we have to set up the Firebase instance and figure out where we should put all the methods related to authentication. The Firebase application initialization has already been done inside the store/index.js file. Just add the apiKey and authDomain configuration entries if you still do not have them included in the config:

// store/index.js
let config = {
  apiKey: 'YourAPIKey',
  databaseURL: 'https://profitoro-ad0f0.firebaseio.com',
  authDomain: 'profitoro-ad0f0.firebaseapp.com'
}
let firebaseApp = firebase.initializeApp(config)

I will also export firebaseApp within the store's state property using the spread operator: ...

Get Vue.js 2 and Bootstrap 4 Web Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.