Skip to content
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

fix: RememberMe cookie does not work with Cookie prefix #212

Merged
merged 1 commit into from Jun 8, 2022

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Jun 6, 2022

  • fix missing Cookie.prefix
  • fix hard coded cookie name remember

Cookie helper must be loaded, but it is easy to forget it.
So I removed Cookie helper functions.
@kenjis kenjis added the bug Something isn't working label Jun 6, 2022
Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not certain why the helper methods didn't work but your test looks clear and code is good.


return get_cookie('remember');
$cookieName = setting('Cookie.prefix') . setting('Auth.sessionConfig')['rememberCookieName'];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a good candidate for a Config method, like we did with redirect URL. At this point it looks like this is the only place it is used.

@kenjis
Copy link
Member Author

kenjis commented Jun 7, 2022

I'm not certain why the helper methods didn't work

I'm sure you already know this.
codeigniter4/CodeIgniter4#6080

@MGatner
Copy link
Member

MGatner commented Jun 7, 2022

Yep, found that right after making this comment!

@kenjis kenjis merged commit 65c5d13 into codeigniter4:develop Jun 8, 2022
@kenjis kenjis deleted the fix-remember-cookie branch June 8, 2022 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants