sidebase / nuxt-session

Nuxt session middleware to get a persistent session per app user, e.g., to store data across multiple requests. The nuxt session module provides the useSession() composable out of the box and sets up API endpoints to interact with your session to make working with sessions feel like a breeze.
https://sidebase.io/nuxt-session/
MIT License
189 stars 19 forks source link

How to configure Redis? #26

Closed JacobArrow closed 1 year ago

JacobArrow commented 1 year ago

Hello!

I'm looking for an example on how to configure the storage options to work with a Redis server through unstorage. I am unable to figure out the syntax for configuring it inside the session.session.storageOptions setting.

zoey-kaiser commented 1 year ago

Hi @JacobArrow!

In the current release we saldy only support memory storage, as we ran into some serialization issues when using other storage solutions (#8).

However we have a open PR that is working on fixing this issue here: https://github.com/sidebase/nuxt-session/pull/7

It is coming along very well and we hope to merge it soon! When we do so, we will include more documentation on the different storage options #9. You are free to look into the PR, give feedback on it and follow along!

JacobArrow commented 1 year ago

Thank you very much for the insight @zoey-kaiser! I will pay close attention to the PR :)

BracketJohn commented 1 year ago

Hey @JacobArrow, this works now, see the docs here: https://github.com/sidebase/nuxt-session#configuration Thanks tgo @Twitch0125 for implementing this 🎊

Please let us know if you have any other problems with this, or open a new issue for future bug / features request!

BracketJohn commented 1 year ago

@JacobArrow here's the exact link to the relevant docs: https://github.com/sidebase/nuxt-session#example-of-using-a-different-storage-driver