-
-
Notifications
You must be signed in to change notification settings - Fork 729
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
Count active browser sessions per user #8736
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files |
@@ -12,4 +12,5 @@ export interface ISessionStore extends Store<ISession, string> { | |||
getSessionsForUser(userId: number): Promise<ISession[]>; | |||
deleteSessionsForUser(userId: number): Promise<void>; | |||
insertSession(data: Omit<ISession, 'createdAt'>): Promise<ISession>; | |||
getUserSessionsCount(): Promise<{ userId: number; count: number }[]>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe getSessionCount to be consistent with insertSessions? We have ForUser in the name only when there's a param userId
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getSessionsCount
is OK
@@ -283,6 +284,10 @@ const flags: IFlags = { | |||
process.env.UNLEASH_EXPERIMENTAL_FLAG_OVERVIEW_REDESIGN, | |||
false, | |||
), | |||
showUserDeviceCount: parseEnvVarBoolean( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems to be inconsistent. We have user session count not device count in the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments inside
About the changes
Show info on how many devices a user is logged in to an admin.