nuxt-auth
nuxt-auth copied to clipboard
Implement functionality to parse getSession() response data efficiently
Describe the feature
To simplify the process of obtaining the user object from the getSession() response, I would like to parse the JSON data directly from the request and retrieve the user object from the "data" property. Currently, I am required to store the entire response and extract the user object each time, which is inefficient.
My response json almost all the time is like this:
{ "data": {...user}, "status_code": 200, "message" : "Success", }
Additional information
No response
Any idea how we should implement this?
One idea: We could give the option to also specify a jaon pointer to the actual session data, so that the right subfield will be extracted
Yes, that would be a good idea.
cc @Danielwinkelmann btw for more json-pointer use-cases!
@BracketJohn I implement the feature in the new PR
Hi @zoey-kaiser, why did you put this completed if it hasn't been merged for 6 months now and review is pending on the PR?
Closed via #592