-
-
Couldn't load subscription status.
- Fork 184
Closed
Description
Describe the feature
Hi! I'm João Pedro. I'm one of the maintainers of the nuxt 2 auth module :)
So, currently, each time useSession is used it makes a request to the api to get the session, which means we have to await for the request and this makes the component asynchronous. And if it's used in more than one component, it will make unnecessary requests.
My proposal is to use useSession only to get the data stored with useState, and fetch the session on load the page through a plugin.
This follows the same approach of the auth module, which fetches the user on load the auth plugin.
Additional information
No response
noookzoey-kaiser
Metadata
Metadata
Assignees
Labels
No labels