JamesHawk585
JamesHawk585

Reputation: 1

Flask SQLAlchemy SecureCookieSession Won't Persist Value

I am working on persisting user data to the Secure Cookie Session object whenever a user signs up or logs in. I noticed that I could set the session values in the login and signup routes, and those values remain in the Secure Session Cookie until I navigate to a new route, at which time the Secure Cookie Session is showing as empty when I print session.

I've been scouring the Flask docs and my own code with no luck.

(https://i.sstatic.net/YsR6N.png) Here is my authorized route: (https://i.sstatic.net/1NiID.png) Server Log: (https://i.sstatic.net/nAAPC.png) config file: (https://i.sstatic.net/IVzII.png) Response Headers:(https://i.sstatic.net/gZ1jB.png)

I've tried manually adding the username to the session in the login and signup routes. I've also verified that my flask version matches 2.3.3 a previous project where I got this working, so I'm not sure that the dependency is to blame. Any suggestions?

Upvotes: 0

Views: 49

Answers (0)

Related Questions