Pinia is no longer required to use the auth module but can still be used. By default, it is disabled and instead nuxt's useState will be used instead.
Storage
Moved login watch to a plugin.
Consolidated store/storage options: localStorage, sessionStorage, cookie, and pinia have all been moved under on property called stores. The storage names also been shortened so localStorage is local, cookie is cookie, and sessionStorage is session.
The strategy cookie, will no longer be present if you're not logged in.
The syncUniversal/setUniversal now accept a third object parameter that dictates whether or not you want to exclude a store (the store won't be added in any case if it's disabled in your options). In the case for cookies, you can either use a boolean or an object which contains the cookie's options.
Cookie Scheme
The Cookie scheme has been added back under the local scheme. It still retains the same functionality if you're not using the token property.
The Laravel Sanctum provider will use the token method by default, if you would like to use the SPA method set token.type to false.
Typescript
When configuring the auth module options for the strategies would have no type hinting. This version should help fix that.
Nuxt i18n
The module now has basic support for nuxt/i18n. Since this is new, if you encounter any issues please don't hesitate to ask. The i18n will change the locale of the redirects.
Documentation
I don't have the resources to set up a documentation page for all of these, but I still do have the Stackblitz setup so you may use that as I will update it when needed.
Changes & Additions
Pinia
Pinia is no longer required to use the auth module but can still be used. By default, it is disabled and instead nuxt's useState will be used instead.
Storage
stores
. The storage names also been shortened so localStorage islocal
, cookie iscookie
, and sessionStorage issession
.Cookie Scheme
token.type
to false.Typescript
Nuxt i18n
The module now has basic support for
nuxt/i18n
. Since this is new, if you encounter any issues please don't hesitate to ask. The i18n will change the locale of the redirects.Documentation
I don't have the resources to set up a documentation page for all of these, but I still do have the Stackblitz setup so you may use that as I will update it when needed.