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

Track last login date for users #2357

Merged
merged 5 commits into from
Apr 11, 2024
Merged

Track last login date for users #2357

merged 5 commits into from
Apr 11, 2024

Conversation

bttf
Copy link
Collaborator

@bttf bttf commented Apr 8, 2024

Changes

  • Adds check to auth middleware for lastLoginDate on member row of the organization
  • If lastLoginDate is undefined or >12 hours old, we update it.
    • 12 hour interval is to minimize DB calls per request. Consequently, the last login date shown in the UI is only accurate to the date (and not the hour, minute).
  • If incoming request has no organization or member row associated with it, we skip entirely

Screenshot
Screenshot 2024-04-08 at 4 41 59 PM

Copy link

github-actions bot commented Apr 8, 2024

Your preview environment pr-2357-bttf has been deployed.

Preview environment endpoints are available at:

Copy link
Contributor

@romain-growthbook romain-growthbook left a comment

Choose a reason for hiding this comment

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

This looks pretty straight forward to me, only minor stuff on optimization question and one user-friendliness.

@bttf bttf merged commit e3fc4c7 into main Apr 11, 2024
3 checks passed
@bttf bttf deleted the adnan/last-login-date branch April 11, 2024 17:50
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

3 participants