Google Auth and state management
In this first section, we will create our first Vuex store to help us manage the state of our application. We will use it to store the current user logging in through the Google OAuth API, which allows them to use their Google account to connect to our app.
Project setup
First, let's set up the basic structure of our new project. We will continue using the router and a few parts of Chapter 5, Project 3 - Support Center.
Creating the app
In this section, we will setup the base app structure for our Geolocated Blog.
- Like we did in Chapter 5, Project 3 - Support Center, we will initialize a Vue project with
vue-init
and install the babel, routing, and stylus packages:
vue init webpack-simple geoblog</strong>
cd geoblog
npm install
npm install --save vue-router babel-polyfill
npm install --save-dev stylus stylus-loader babel-preset-vue
Note
Don't forget to add the "vue"
preset in the .babelrc
file.
- Then remove the content of the
src...