Yes, resetting the session AFTER you log into the userβs system (what seems to be happening?) Is definitely not the case. You want to do this BEFORE a user entry.
Ideally, you want to do this before you log in, but only if the login is really successful - but I'm not sure if you can get auth_logic for this, I'm not very experienced with auth_logic, although this is REALLY a good question for auth_logic, if I were you, I would file it as a support ticket with auth_logic.
But at the same time, you can just try reset_session at the top of the action method to @user_session = current_client.user_sessions.new(params[:user_session]) . I think this will work, and in the worst case, reset the session in some cases when you really didnβt have to (if the user credentials were invalid), but I do not think this will cause a serious problem. (uh-oh, if this does not lead to the loss of verification errors?)
But then again, not an auth_logic expert. I do not expect you to accept this answer, since I have no experience to really answer it, just by sharing what I think, in case it helps you, and giving you some guidance on how to think about this one.
source share