Vishnu Narayanan and GitHub
92a1fb8ab7
feat: manage active user sessions from profile (CW-7169) ( #14556 )
...
## Description
First PR of user_sessions feature - enforcement, impersonation and mfa will be handled separately.
Adds an Active Sessions section under Profile where users can see every
device currently logged in and revoke any session they don't recognize.
Helps users lock down stale or unrecognized logins on their own without
needing support.
**Behavior at the limit, by client:**
- **Browser:** returns 409 with a picker overlay; user picks a session
to revoke or chooses "End all sessions" to clear them.
- **Mobile / API client:** silently evicts the oldest session and
proceeds with login (no picker UI to render).
- **Pre-tracking users** (token rows without `user_sessions`, i.e.
anyone already logged in before this ships): silent-evict any untracked
token first, so freshly tracked sessions are never killed in favor of
legacy ones.
Sessions are stored in a new `user_sessions` table keyed on `(user_id,
client_id)` with browser, platform, IP, last activity and (when
configured) geo. Kept in sync with `user.tokens` via an after_save
callback so revoking a token from any path cleans up the row.
Fixes https://linear.app/chatwoot/issue/CW-7169
## Type of change
- [x] New feature (non-breaking change which adds functionality)
## How Has This Been Tested?
- Added specs.
- Manual local testing: browser picker fires at limit; pre-tracking user
silent-evicts; mixed tracked/untracked correctly drops the untracked one
first; profile page revoke succeeds; current session cannot be revoked
from profile.
## Checklist
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream
modules
2026-06-12 16:11:07 +05:30
0d05a07aa7
fix: Prevent display_name reset when updating password ( #10374 )
...
Fixes #10372
---------
Co-authored-by: Pranav <pranavrajs@gmail.com >
2025-06-11 19:05:30 -04:00
873cfa08d8
feat: Ability to reset api_access_token ( #11565 )
...
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com >
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com >
Co-authored-by: iamsivin <iamsivin@gmail.com >
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com >
2025-05-29 14:42:13 +05:30
0c35a77d4b
feat: Show a confirmation banner if the email is not verified ( #8808 )
...
Co-authored-by: Pranav Raj S <pranav@chatwoot.com >
2024-02-02 12:31:29 -08:00
Pranav Raj S and GitHub
766698cb3a
chore: Upgrade @june-so/analytics-next, js-cookie to the latest version ( #8799 )
...
This is a small change, upgrading 2 packages to the latest version. getJSON is removed from the latest version, I've added a patch for the same across the codebase.
fixes: https://linear.app/chatwoot/issue/CW-3035/upgrade-dependencies
2024-01-29 11:41:42 +04:00
Pranav Raj S and GitHub
6b2ed4fe79
fix: Add reset password for edit agent screen ( #8130 )
2023-10-17 12:54:05 -07:00
b57063a8b8
feat: Support dark mode in login pages ( #7420 )
...
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com >
2023-07-01 07:49:52 +05:30
Shivam Mishra and GitHub
00ee0478eb
feat: IndexedDB based caching for labels, inboxes and teams [CW-50] ( #6710 )
...
* feat: allow caching of labels in the account scope
* feat: send cache keys in account json response
* feat: kickstart web worker
* feat: setup basic architecture for workers
* feat: install idb
* feat: add datamanger
* fix: typos
* refactor: rename method
* feat: make init db a manual step
* refactor: separate accountIdFromRoute
* feat: cache enabled API client
* feat: enable caching for inboxes and labels
* feat: enable cache for team
* feat: manage exceptions for team
* feat: add team to data manager
* feat: add a generic listener
* refactor: send only cache keys
* refactor: separate validate method
* feat: add listeners
* feat: add event for revalidate
* feat: add cache keys endpoint
* refactor: fetch cache keys instead of full account data
* fix: key pattern
* feat: don't fetch account for cache_keys
* fix: cache key base class
* refactor: cache keys helper
* feat: add helper
* fix: cache-key update logic
* feat: delete indexeddb on logout
* feat: remove worker.js
* refactor: move data-manager
* refactor: name of file
* feat: add test for DataManager
* refactor: add fake idb to jest setup
* test: cache keys helper
* test: cache keys helper
* test: cache_keys in accounts controller
* refactor: remove cache_keys context
* feat: add policy for cache-keys
2023-03-27 12:16:25 +05:30
aaacf9d4d2
feat: Allow users to disable marking offline automatically ( #6079 )
...
Co-authored-by: Nithin David <1277421+nithindavid@users.noreply.github.com >
2022-12-16 11:59:27 -08:00
b668723313
chore: Ability to change default account ( #5393 )
...
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com >
Co-authored-by: Tejaswini Chile <tejaswini@chatwoot.com >
2022-10-05 17:31:12 -07:00
Pranav Raj S and GitHub
0319b78eac
fix: Allow users to login even if they have access to more than 15 accounts ( #4475 )
2022-04-14 20:54:26 +05:30
Pranav Raj S and GitHub
9583a2dbad
chore: Pass sso_account_id to select the account during SSO Login ( #4103 )
2022-03-03 20:49:51 +05:30
ea44a32758
feat: Add hCaptcha for public forms ( #4017 )
...
- added hCaptcha based verification for chatwoot signups
Co-authored-by: Sojan <sojan@pepalo.com >
2022-02-18 20:02:50 +05:30
Pranav Raj S and GitHub
2591a04c0b
chore: Remove message_signature_enabled from users ( #3982 )
2022-02-15 12:10:53 +05:30
Nithin David Thomas and GitHub
351a3dc372
feat: Adds email signature form to profile settings ( #3906 )
2022-02-15 10:38:24 +05:30
Santhosh C and GitHub
b326da7d94
feat: Ability to remove user profile picture ( #3156 )
...
Fixes #3107
2021-11-27 00:56:07 +05:30
Sojan Jose and GitHub
c54aae21ff
chore: Move agent availability to Account level ( #3074 )
...
- Move agent availability to the account level
2021-10-07 13:21:46 +05:30
467b45b427
feat: Improved password security policy ( #2345 )
...
Co-authored-by: Pranav Raj S <pranav@chatwoot.com >
2021-06-07 17:26:08 +05:30
Nithin David Thomas and GitHub
1d3b1c1ae5
Fix: invalidates session if user cookie is absent ( #2046 )
2021-04-02 15:31:22 +05:30
Pranav Raj S and GitHub
160a6fc6cf
feat: Save UI state in the database ( #1635 )
...
feat: Save UI state in the database
2021-01-10 19:25:33 +05:30
Pranav Raj S and GitHub
9d3dda9a61
feat: Add full name to the user signup form ( #1534 )
2020-12-21 14:05:19 +05:30
127ffda762
feat: Change availability status from sidebar ( #1288 )
...
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com >
2020-10-02 11:16:12 +05:30
Pranav Raj S and GitHub
2b1d445003
feat: Use display_name instead of name of the agent ( #1097 )
...
* feat: Use display_name instead of name of the agent
2020-07-27 22:19:26 +05:30
c98907db49
Feature: Availability Statuses ( #874 )
...
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com >
2020-07-04 11:42:47 +05:30
Pranav Raj S and GitHub
c4e2a84f65
Feature: Agent Profile Update with avatar ( #449 )
...
* Feature: Agent Profile Update with avatar
* Add Update Profile with name, avatar, email and password
2020-02-16 17:20:38 +05:30
Pranav Raj S and Sojan Jose
2ce7438c79
[Refactor] Cleanup agent store and actions ( #373 )
...
* Cleanup agent store and actions
* Move set/create/update/destroy to helpers
* Update mutation specs
* Add specs for API helper
* Fix edit/delete action visibility
* Add actions specs
* Remove unused API helpers
* Remove duplicates
* Remove duplicates
* Fix duplicate
2019-12-21 22:54:35 +05:30
Sojan Jose and GitHub
3988777718
Refactoring the code for pub sub ( #155 )
...
- We were using the attribute name 'channel' to store pubsub tokens, which was confusing.
- switched to faker from ffaker
- spec for contact.rb
2019-10-17 03:18:07 +05:30
Pranav Raj S and GitHub
2783fb6006
Move src to dashboard ( #152 )
2019-10-16 14:36:17 +05:30