Add server-side access to tokens and session for the `local` and `refresh` providers
Describe the feature
A set of simple server-side functions that mirror getServerSession and getToken from the authjs provider, but for the local and refresh providers.
How would you implement this?
Add the two new functions, extract the token via the cookie from the h3 event. To retrieve the session data, use the token and send a backend request to the configured authentication API and return the data.
Additional information
- [X] Would you be willing to help implement this feature?
Provider
- [ ] AuthJS
- [X] Local
- [X] Refresh
- [ ] New Provider
Hey, @zoey-kaiser do you have plans to continue to develop this feature?
Hi @dygaomarques 👋
I had orignally paused development, as we began reworking on internal urls are handled (which greatly effect how getServerSession would work). Its already easily do-able to implement these function yourself (see https://github.com/sidebase/nuxt-auth/pull/855), but I still think it would be nice to add built-in support for this!
I am sadly pretty busy at the moment and am unsure when I could get around to it. Your welcome to pick up where I left off 🤗 Otherwise I may revisit the old PR when I have a bit more free time again 😅