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

UserMod updates when user logs in, invalidates JWT cookie #18101

Closed
wezell opened this issue Mar 5, 2020 · 3 comments
Closed

UserMod updates when user logs in, invalidates JWT cookie #18101

wezell opened this issue Mar 5, 2020 · 3 comments

Comments

@wezell
Copy link
Contributor

wezell commented Mar 5, 2020

When a user logs in we update the user record with the last login date and clear the failed logins, etc.

What happens is that our JWT cookie implementation checks that the JWT cookie is NEWER than the last user mod date, which is now invalid.

It looks like this:

  1. User logs in
  2. Login Success, dotCMS sends an access cookie with modDate = now()
  3. dotCMS update user record with login success which changes the user.modDate = now()
  4. DB commits
  5. access cookie is now older than user.modDate
wezell added a commit that referenced this issue Mar 5, 2020
wezell added a commit that referenced this issue Mar 5, 2020
wezell added a commit that referenced this issue Mar 10, 2020
@wezell wezell added this to the Bug Sprint milestone Mar 10, 2020
@jdotcms jdotcms self-assigned this Mar 10, 2020
jdotcms added a commit that referenced this issue Mar 12, 2020
jdotcms added a commit that referenced this issue Mar 13, 2020
jdotcms added a commit that referenced this issue Mar 13, 2020
jdotcms added a commit that referenced this issue Mar 17, 2020
@jdotcms
Copy link
Contributor

jdotcms commented Mar 17, 2020

PR

@erickgonzalez
Copy link
Contributor

This issue probably needs the label Needs Doc since a new Resource was created.

@bryanboza
Copy link
Member

Fixed, new card created in order to add the postman tests here #18213

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants