-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting a layer or service #17
Comments
Can you provide more context for this question? What framework are you using? |
Yes, I am using Axum web framework. I'm trying to use encrypted session cookies stored in Redis. I read the docs, but don't see a way to add the Redis connection as a layer in Axum. I do see how to add the session as a session_layer. The use case is to store a users id in an encrypted cookie with Redis as the session store. Currently a record inserted in Redis in one handler cannot be retrieved in another handler. Here's my setup: use axum_sessions::{async_session::{Session, SessionStore as _}, SameSite, SessionLayer}; let secret = b"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; |
I think this is an issue for the Axum sessions library, if I understand correctly |
Thanks, I put a note out to them. However am also getting the following errors on methods not existing in store from async-redis-session: 92 | let cookie_value = store.store_session(session).await; error[E0599]: no method named Code is:
|
|
Hi, how is can you set the redis store as a layer or service in the main function so the connection can be used in handlers?
The text was updated successfully, but these errors were encountered: