-
Notifications
You must be signed in to change notification settings - Fork 52
Yosai web: How to keep user logged in? Bug? #22
Comments
Hi @brunoais . I haven't touched this project in a long while! Before I dig in, would you please help me understand your situation? Are you reading through source code prior to testing an actual web application, trying to make sense prior to lift-off? Are you using the additional plugins, yosai_alchemystore and yosai_dpcache? I spent most of my time testing using cache-backed session handling (redis). Are you doing the same? Take a look at the demo web app written using Pyramid and see if this helps at all. |
@Dowwie Additionally, when I restart the server, it is giving Thanks for the quick answer. |
By the way, there are things that I am struggling with. For example, where is the |
Another element I hadn't mentioned is that I will want to store the user's session as a cookie (ciphered and signed) in the browser. I don't want to have session and session data in the server. |
From what I investigated, the user is not being kept logged in between accesses to the pages.
I am running
Yosai==0.3.2
and I'm making use of the web component.I've noticed that, after the user is logged in, the session is not kept between pages.
According to the web's mgt.py:87-90 code, the user id is gotten from the context while also the web_registry is available on that same line. On that line, even though, the web_registry which is available there with the current session_id, the session_id is got from the context and not from the web_registry.
From me following the code, I find that, at no point in the execution of YosaiWeb the session_id is got from the web_registry. Am I doing something wrong?
I am not allowing users to use the
remember_me
functionality by not giving them the option toI've tried searching through the tests and I can't find any test that actually tests to flask web so a user logs in and then testing if the session was kept on between requests.
As a temp-fix, I will change that line 89 so it gets the session from the web registry when the one from the context is
None
@Dowwie How do I unstuck myself without creating security holes?
The text was updated successfully, but these errors were encountered: