The $fetch plugin needs some changes as well, since we need to log the user out if their session has expired:
- 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 {
- Don't forget to import the store:
import store from '../store'
You can now try logging in through Google to your app!