(Re)introducing Vue Router
Before we dive in, we need to quickly refresh our understanding of how our frontend and backend communicate and ensure that we know how things work.
You may recall from Chapter 9, Tailwind, Middleware, and CORS that we set up our axios
instance (under src/lib/api.js
). With a few defaults, this is where the withCredentials
value comes into play:
export default axios.create({ baseURL: import.meta.env.VITE_BASE_API_URL, withCredentials: true, transformRequest: [...axios.defaults.transformRequest, transformSnakeCase], transformResponse: [...axios.defaults.transformResponse, transformCamelCase], });
We want to ensure that all our hard work with the Secure...