-
-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Remember me" function #211
Comments
Good catch. You're right. You have to add It would be great if you could send a PR with a fix. |
Thank you @michalsn ! |
Specifying I just setup a brand new CI & Myth:Auth install to verify, created the user, then logged in with remember me checked. When I check my cookies in the browser the remember cookie is there as it should be. So it sounds like something else might be going on here. Do you use |
So... "remember me" cookie is set correctly in your case? Watching at the code I would say it's a bit surprising. I know that I started testing it in different environments because it seems strange to me and these are the results:
Idk... maybe I'm missing something here? I was using CI v4.0.3 and Myth:Auth dev-develop. |
I'm also trying to test different cases scenario. I have re-installed from the start latest stable CodeIgniter framework (4.0.3) by composer and Myth/Auth (dev-develop branch, but also tryed 1.0-beta.2), on Windows Apache and PHP 7.4.5. Basic configuration of CodeIgniter .env (app.baseURL, database, email.. No secure https forcing) and basic Myth/Auth config (set allowRemembering to true and set my /app/Config/Filter with global login filter). The issue still persist. But if @lonnieezell has tested it with success, I suppose it can be an environment or configuration related issue... |
Nope - you guys are correct. I must have been seeing a remember cookie from a previous app running on localhost. I just deleted the cookie and tried again and it's not there. I think a good solution here is not for us to address it in Myth:Auth, since you could run into Can anyone see an issue with doing this? |
Forgive me Lonnie: I think I understand a little what the problem is, but unfortunately I do not have the necessary knowledge to say my opinion about the solution you propose, not being able to understand any advantages and disadvantages. I think you'll be able to share your point of view with Michal... I'm available if there's any way I can help with evidence or anything. |
Initially, I was thinking about making a copy of the cookies only, but I guess headers also could be handy. I wonder if assigning these headers previously set by response service can brake something but I can't think of anything for now. Also, the question is should we make a copy of everything upon |
You are correct. Additional methods like that would be best. I like it. |
I've updated CI with the new methods discussed here. I won't have time tonight to update this, so if someone beats me to it, I'm fine with that :) |
First of all, excuse me for every mistake I'll can do: I'm not a very capable developer ;-)
I am testing CodeIgniter 4 and myth:auth library; I am not able to let "remember me" option to work. I have done some debug and "remember" cookie is not setted up by rememberUser function inside Authentication\AuthenticationBase.php.
Now, after several test I am able to let it work if I add a
$response->send();
after$response->setCookie
, between lines 251 and 252. Is it possible that "remember me" have this little bug that missing to send HTTP Response? Or it should it in other way automatically? In this case, why don't work for me?The text was updated successfully, but these errors were encountered: