Auth-module: Javascript heap out of memory

Created on 7 Mar 2019  路  3Comments  路  Source: nuxt-community/auth-module

I get an error with the latest @nuxt/auth, this error only happens in development, not in production.

The cookies module, which is a dependency of @nuxt/auth crashes for some reason. When I remove the nuxt/auth package, everything runs fine.

screenshot 2019-03-07 at 15 55 41

This question is available on Nuxt community (#c290)
question

Most helpful comment

There is a default "local" validation scheme that calls /api/auth/user on every request (even 404s) which if Nuxt's $axios config is not setup with a baseURL that is not on port 3000, you're going to end up calling the Nuxt server in an infinite loop and trying to validate etc.

Set local: false as an auth strategy if you don't use local validation and ensure your Nuxt config has an axios.baseURL configured to prevent port 3000 being the default causing infinite loops when your authentication routine uses relative paths.

All 3 comments

This issue as been imported as question since it does not respect auth-module issue template. Only bug reports and feature requests stays open to reduce maintainers workload.
If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically.
Your question is available at https://cmty.app/nuxt/auth-module/issues/c290.

There is a default "local" validation scheme that calls /api/auth/user on every request (even 404s) which if Nuxt's $axios config is not setup with a baseURL that is not on port 3000, you're going to end up calling the Nuxt server in an infinite loop and trying to validate etc.

Set local: false as an auth strategy if you don't use local validation and ensure your Nuxt config has an axios.baseURL configured to prevent port 3000 being the default causing infinite loops when your authentication routine uses relative paths.

Why has this issue been solved? Nuxt running out of memory here is the issue, not setting local auth scheme to fasle - nuxt fails miserably here and this should be addressed rather by burying and not documenting a workaround in an github issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ishitatsuyuki picture ishitatsuyuki  路  4Comments

amjadkhan896 picture amjadkhan896  路  3Comments

javialon26 picture javialon26  路  3Comments

dasisyouyu picture dasisyouyu  路  3Comments

weijinnx picture weijinnx  路  3Comments