AuthSession User not saved #219
-
I am trying to build user authentication and following the examples from the docs, but it seems like the session user resets to None. Maybe I am not understanding it correctly, but if I make a curl login request and then another curl to login only route, should my session user still be there? Currently I can't make it happen. |
Beta Was this translation helpful? Give feedback.
Answered by
maxcountryman
Apr 27, 2024
Replies: 1 comment 3 replies
-
How are you making your curl requests? They should include the cookie set by logging in. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There will be a cookie (via the
Set-Cookie
header) that you should see in the HTTP response. When you talk to the login endpoint for example this cookie will be provided in the response. Every request after that must include this cookie since that's how the session is identified by tower-sessions. I believe curl has some cookie handling facilities built in so you may want to check that you're using those or otherwise provide the cookie manually in your requests.