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

Do not use permanent when reading from cookies #91

Merged
merged 3 commits into from
Mar 17, 2023
Merged

Do not use permanent when reading from cookies #91

merged 3 commits into from
Mar 17, 2023

Conversation

fredplante
Copy link
Contributor

@fredplante fredplante commented Dec 14, 2022

When we want to store a permanent cookies, we have to use the permanent accessor. When reading, this is not needed. See documentation :

This jar is only meant for writing. You'll read permanent cookies through the regular accessor.

When we want to check for a cookie existence, instead of doing:

cookies.encrypted[:remember_token].present?

we can do just:

cookies[:remember_token]

@fredplante fredplante changed the title Do not user permanent when reading from cookies Do not user permanent when reading from cookies Dec 14, 2022
@fredplante fredplante changed the title Do not user permanent when reading from cookies Do not use permanent when reading from cookies Dec 14, 2022
Copy link
Owner

@stevepolitodesign stevepolitodesign left a comment

Choose a reason for hiding this comment

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

Thank you for taking the time to point out that the call permanent is only meant for writing. Overall, this looks good, but I added some comments for consideration.

@fredplante
Copy link
Contributor Author

@stevepolitodesign CI fixed in #92

You might want to merge the other first, then I'll rebase this one

@stevepolitodesign stevepolitodesign merged commit 0416b6f into stevepolitodesign:main Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants