Adapting the fetch plugin

The $fetch plugin needs some changes as well, since we need to log the user out if their session has expired:

  1. In this case, we just need to dispatch the 'logout' action:
      } else if (response.status === 403) {
// If the session is no longer valid
// We logout
store.dispatch('logout')
} else {
  1. Don't forget to import the store:
      import store from '../store'

You can now try logging in through Google to your app!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.211.87