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

Make sure the session expiration information is present in the cookie #201

Merged
merged 3 commits into from Jun 30, 2013

Conversation

mem
Copy link
Contributor

@mem mem commented Jun 30, 2013

Hi,

the change that added session expiration data broke the bookings sample. If you clear your cookies and try to login, it will fail the first time, and succeed the second time. This is because the session information didn't make it to the cookie, and the session is getting cleared. Therefore the code cannot see that the user has been authenticated. At the same time, when asking the user to authenticate the second time, the TS key in the cookie is set, and the second authentication request succeeds.

With these changes the login works the first time.

mem added 3 commits June 30, 2013 10:46
Since we are adding the session expiration information to the cookie
just before building the cookie, we make sure that the Expires and the
information in the cookie match.

In this way we do not need to resort to gymnastics to put the session
expiration information in the session.
@robfig
Copy link
Contributor

robfig commented Jun 30, 2013

Looks good. Thanks!

robfig added a commit that referenced this pull request Jun 30, 2013
Make sure the session expiration information is present in the cookie
@robfig robfig merged commit 501d82c into revel:master Jun 30, 2013
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.

None yet

2 participants