1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-28 04:08:47 +02:00
The browser extension vault (Chrome, Firefox, Opera, Edge, Safari, & more).
Go to file
Matt Gibson 7a7fe08a32
Ps/pm 2910/handle switch messaging (#6823)
* Handle switch messaging

TODO: handle loading state for account switcher

* Async updates required for state

* Fallback to email for current account avatar

* Await un-awaited promises

* Remove unnecessary Prune

Prune was getting confused in browser and deleting memory in browser on
account switch. This method isn't needed since logout already removes
memory data, which is the condition for pruning

* Fix temp password in browser

* Use direct memory access until data is serializable

Safari uses a different message object extraction than firefox/chrome
and is removing `UInt8Array`s. Until all data passed into StorageService
is guaranteed serializable, we need to use direct access in state
service

* Reload badge and context menu on switch

* Gracefully switch account as they log out.

* Maintain location on account switch

* Remove unused state definitions

* Prefer null for state

undefined can be misinterpreted to indicate a value has not been set.

* Hack: structured clone in memory storage

We are currently getting dead objects on account switch due to updating
the object in the foreground state service. However, the storage service
is owned by the background. This structured clone hack ensures that all
objects stored in memory are owned by the appropriate context

* Null check nullable values

active account can be null, so we should include null safety in the
equality

* Correct background->foreground switch command

* Already providing background memory storage

* Handle connection and clipboard on switch account

* Prefer strict equal

* Ensure structuredClone is available to jsdom

This is a deficiency in jsdom --
https://github.com/jsdom/jsdom/issues/3363 -- structured clone is well
supported.

* Fixup types in faker class
2023-11-29 09:59:50 -05:00
.codescene disable code duplication check in unit tests (#6773) 2023-11-06 15:48:34 -05:00
.github [DEVOPS-1651] Update the QA deployment alert at the start (#6998) 2023-11-29 09:41:22 +01:00
.husky Make husky hook executable (#2900) 2022-06-14 07:26:50 +02:00
.storybook [CL-141] Custom storybook theme (#5569) 2023-11-16 08:24:22 -06:00
.vscode [CL-120] add CL i18n entries to desktop and browser (#6073) 2023-08-21 09:01:13 -04:00
apps Ps/pm 2910/handle switch messaging (#6823) 2023-11-29 09:59:50 -05:00
bitwarden_license updated bit_lic/app-routing module (#6995) 2023-11-28 09:45:13 -08:00
libs Ps/pm 2910/handle switch messaging (#6823) 2023-11-29 09:59:50 -05:00
patches Make Argon2 WebAssembly module unload after use (#5072) 2023-07-03 07:12:42 -05:00
scripts Return error code when any tsc typecheck fails (#5459) 2023-05-16 09:20:40 -05:00
.editorconfig Add support for migrated jslib (#2826) 2022-06-03 18:01:07 +02:00
.eslintignore Return error code when any tsc typecheck fails (#5459) 2023-05-16 09:20:40 -05:00
.eslintrc.json Add State Provider Framework (#6640) 2023-11-09 17:06:42 -05:00
.git-blame-ignore-revs Add support for migrated jslib (#2826) 2022-06-03 18:01:07 +02:00
.gitattributes Apply Prettier (#2238) 2021-12-21 15:43:35 +01:00
.gitignore Noop notifications for dev (#6671) 2023-10-24 15:18:23 +02:00
.nvmrc [PM-358] Bump electron to 24 and node to 18 (#5205) 2023-05-01 11:09:24 +02:00
.prettierignore Auth/ps 2298 reorg auth (#4564) 2023-02-06 15:53:37 -06:00
.prettierrc.json Update CL documentation (#5379) 2023-05-08 14:46:59 +02:00
angular.json [PM-2276] Upgrade Storybook to v7 (#5258) 2023-05-26 15:58:06 +02:00
clients.code-workspace Override eslint config for vscode workspace (#4566) 2023-01-26 14:26:21 +01:00
CONTRIBUTING.md Update README and CONTRIBUTING to point to contributing.bitwarden.com (#2771) 2022-06-13 17:34:07 +10:00
jest.config.js [PM-3587] create @bitwarden/vault lib (#6083) 2023-08-22 10:02:48 -04:00
LICENSE_BITWARDEN.txt Update LICENSE_BITWARDEN.txt (#3505) 2022-09-13 09:04:36 -04:00
LICENSE_GPL.txt Prepare bitwarden_license directory (#2663) 2022-05-09 17:50:15 +02:00
LICENSE.txt Prepare bitwarden_license directory (#2663) 2022-05-09 17:50:15 +02:00
package-lock.json [deps] Autofill: Update patch-package to v8 (#7013) 2023-11-28 17:17:00 -05:00
package.json [deps] Autofill: Update patch-package to v8 (#7013) 2023-11-28 17:17:00 -05:00
README.md Remove migration details from the readme (#4780) 2023-02-16 16:11:38 +01:00
SECURITY.md Revise language on SECURITY.md 2022-03-15 15:39:14 -04:00
tailwind.config.js [PM-3587] create @bitwarden/vault lib (#6083) 2023-08-22 10:02:48 -04:00
tsconfig.eslint.json [PM-4222] Make importer UI reusable (#6504) 2023-10-19 11:17:23 +02:00
tsconfig.json Ps/pm 2910/add browser storage services (#6849) 2023-11-21 16:35:37 -05:00

Bitwarden

Github Workflow browser build on master Github Workflow CLI build on master Github Workflow desktop build on master Github Workflow web build on master gitter chat


Bitwarden Client Applications

This repository houses all Bitwarden client applications except the Mobile application.

Please refer to the Clients section of the Contributing Documentation for build instructions, recommended tooling, code style tips, and lots of other great information to get you started.

We're Hiring!

Interested in contributing in a big way? Consider joining our team! We're hiring for many positions. Please take a look at our Careers page to see what opportunities are currently open as well as what it's like to work at Bitwarden.

Contribute

Code contributions are welcome! Please commit any pull requests against the master branch. Learn more about how to contribute by reading the Contributing Guidelines. Check out the Contributing Documentation for how to get started with your first contribution.

Security audits and feedback are welcome. Please open an issue or email us privately if the report is sensitive in nature. You can read our security policy in the SECURITY.md file.