Question: I'm using Nuxt and the Auth module. I'm trying to redirect users to a login page when they aren't logged in.

nuxt.config.js:

```
auth: {
  redirect: {
    login: '/account/inloggen',
    logout: '/account/uitloggen',
    callback: '/account/aanmelden',
    home: '/'
  },
  strategies: {
    google: {
      access_token_endpoint: '****/social?identityProvider=Google',
      access_type: 'offline',
      client_id: '*****.apps.googleusercontent.com',
      grant_type: 'authorization_code',
      redirect_uri: 'http://localhost:3000/account/aanmelden',
      response_type: 'code',
      token_key: 'jwt',
      userinfo_endpoint: '****/user/profile'
    }
  },
  cookie: {
    options: {
      maxAge: 86400
    }
  }
  // localStorage: false
},

```

I'm reading the [docs](https://auth.nuxtjs.org/api/options/)

> 
> login: User will be redirected to this path if login is required.
> 
> 
> 

But I can't find where/how I require a user to log in.

The `home: '/'` redirect does work, when the user logs in they get redirected to the root of the app.

Answer: 
Turns out the problem was caused by nuxt configuration for axios module. I just replaced the field 'withCredentials' with simply 'credentials'.

This is now the updated nuxt.config.js:

```
axios: {
    credentials: true,
    baseURL: 'http://localhost/api/',
  },

```
Probably your laravel app is running on 127.0.0.1:8000 and your SPA is running on localhost:3000 or localhost:8080 etc.

Make sure that you:

1. Set the session domain to localhost
2. Set the `supports_credentials` to `true` (cors.php)
3. Set `with_credentials` to `true` in your client
4. When you send requests to your backend, send it to localhost:8000 instead of 127.0.0.1:8000