Hi, This issue has been raised on Stack Overflow many times without any resolution. The gist is that all of the views in my site are protected by the @login_required decorator except for a splash page and a registration page (which is only accessible by going through the splash page and passing a test which sets session data).
At my registration page, I register a user based on my custom UserCreationForm and then authenticate and login this user. For some users, this works as it should. For others though, there is a nasty bug. After they register/login, they are redirected to my homepage as an authenticated User. However, the next request that they send to my site is interpreted as an Anonymous User. They are redirected to my splash page where they have to login in again. Once they login, they are fine to move around the site. I've seen other Django developers have the same exact issue with registering and logging in a user in the same view. There hasn't been a satisfactory answer yet, though I've seen it suggested that it could be related to MySQL timeouts or threading issues. Any thoughts on what could be the cause of this? I can't reproduce the error on my computer, so it's really hard to debug/log. POSSIBLE SOLUTION: I'm thinking about registering the user and setting session variables in the register view and then redirecting to the login view, where I'll read the session variables. That seems somewhat insecure, except for the fact that both register and login are handled through Https. I'm not sure that that strategy will even work. Thanks for any help! Ben -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.