nuxt-alt / auth

An alternative module to @nuxtjs/auth
https://nuxt-alt-auth.vercel.app/
MIT License
96 stars 20 forks source link

User Data response does not contain field [object Object] #51

Closed IlyaSemenov closed 1 year ago

IlyaSemenov commented 1 year ago

cookie auth module prints this error:

User Data response does not contain field [object Object]

The code is incorrect:

https://github.com/nuxt-alt/auth/blob/af9e96a4111140c31d4618165dd11ccf61807c2e/src/runtime/schemes/cookie.ts#L146-L155

The error string should be referring to the specific field (client or server) not the aggregating object.

Denoder commented 1 year ago

can you try version 2.5.0 and use user.property instead of user.property.server/user.property.client

IlyaSemenov commented 1 year ago

Yes, seems to work without server: true in 2.5. Thanks.

Everything worked in 2.4, too, I just reported the mistake I noticed when setting it up.