SohoHouse / nuxt-oauth

Simple OAuth2 integration for your Nuxt app
MIT License
122 stars 27 forks source link

Error after updating to Nuxt 1.1.1 #6

Closed Slasher154 closed 6 years ago

Slasher154 commented 6 years ago

Hi,

I recently updated the Nuxt from 1.0.0-rc9 to 1.1.1 and found this error when I ran 'npm run dev' on the terminal

TypeError: Cannot read property 'authenticated' of undefined at __WEBPACK_IMPORTED_MODULE_0__Users_thanatv_WebstormProjects_thaicom_linkbudget_v3_node_modules_babel_runtime_core_js_object_values___default.some (.nuxt/nuxt-oauth.plugin.js:24:0) at Array.some (native) at __WEBPACK_IMPORTED_MODULE_0__Users_thanatv_WebstormProjects_thaicom_linkbudget_v3_node_modules_babel_runtime_core_js_object_values___default.some (.nuxt/nuxt-oauth.plugin.js:24:0) at Array.some (native) at matched.some (.nuxt/nuxt-oauth.plugin.js:24:0) at Array.some (native) at checkAuthenticatedRoute (.nuxt/nuxt-oauth.plugin.js:24:0) at module.exports.__WEBPACK_IMPORTED_MODULE_1__nuxt_middleware__.a.auth (.nuxt/nuxt-oauth.plugin.js:29:0) at <anonymous> statusCode: 500, name: 'TypeError' }

On Google Chrome nuxt-oauth-error-16-jan-2017

The module works fine with the previous Nuxt version.

Thank you.

samtgarson commented 6 years ago

I'll look into this when I find some time, PR's are always welcome!

Lahori-Jawan commented 6 years ago

I just installed and had the same issue... but @yuki-nakamura commit solved the issu.

samtgarson commented 6 years ago

Sweet, @yuki-nakamura if you want to open a PR I’d be happy to merge 👍

ghost commented 6 years ago

Sorry, @samtgarson. I just noticed your message. thank you fix.