Skip to content

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

Merged
robfig merged 3 commits into
revel:masterfrom
mem:master
Jun 30, 2013
Merged

Make sure the session expiration information is present in the cookie#201
robfig merged 3 commits into
revel:masterfrom
mem:master

Conversation

@mem
Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants