1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00
Commit Graph

11617 Commits

Author SHA1 Message Date
Patrick H. Lauke
1b79812056 Straggler 2021-12-13 17:46:29 +00:00
Patrick H. Lauke
1916136f4c Merge branch 'master' into patrickhlauke-issue1987 2021-12-13 17:37:42 +00:00
Daniel James Smith
18073696d0 Bump node to v16 (#422)
* Pull in jslib

* Bump engines required to node 16 and npm 8

* Bump @types/node to 16

* Modify build.yml to build with node 16 and npm 8

* Update requirements in README.md

* Update 'setup-node' action version

* Update 'pkg' to 5.5.1

* Removed installation of npm8
npm8 is included in node v16

* Pull jslib

* Change engines to only warn on node < 16

Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>
2021-12-13 17:18:20 +01:00
Daniel James Smith
77c107cd21 Merge pull request #2219 from bitwarden/bump-node-to-v16
Bump node to v16
2021-12-13 17:17:10 +01:00
Daniel James Smith
71075cf878 Bump node to v16 (#1336)
* Pull in jslib

* Bump engines required to node 16 and npm 8

* Bump @types/node to 16

* Modify build.yml to build with node 16 and npm 8

* Update requirements in README.md

* Removed step to install npm8
npm8 is included in node v16

* Pull jslib
2021-12-13 17:16:57 +01:00
Daniel James Smith
5865f08b37 Bump node to v16 (#1189)
* Pull in jslib

* Update .nvmrc

* Bump engines required to node 16 and npm 8

* Bump @types/node to 16
The dep on node 14.18 will get cleaned up once we bump electron

* Modify build.yml to build with node 16 and npm 8

* Update requirements in README.md

* Removed install of npm8 and renamed action step
npm8 is included in node v16

* Pull jslib
2021-12-13 17:16:44 +01:00
Addison Beck
f90b3456d5 [Account Switching] [Feature] Allow clients to store data for more than one user (#491)
* [refactor] Extract, rename, and expand StorageServiceOptions

* Pulled StorageServiceOptions into its own file
* Renamed StorageServiceOptions to StorageOptions
* Pulled KeySuffixOpptions into its own file
* Converted KeySuffixOptions into an enum from a union type

* [refactor] Expand StateService into a full coverage storage proxy

* Expand StateService to allow it to manage all data points of the application state regardless of memory.
* Expand StateService to allow for storing and managing multiple accounts

* [refactor] Create helper services for managing organization and provider state data

* [refactor] Implement StateService across service layer

* Remove service level variables used for in memory data storage and replaced with calls to StateService
* Remove direct calls to StorageService in favor of using StateService as a proxy

* [feature] Implement account switching capable services across components and processes

* Replace calls to StorageService and deprecated services with calls to a StateService

* [chore] Remove unused services

Several services are no longer in use because of the expanded state service. These have simply been removed.

* [bug] Add loginRedirect to the account model

* [bug] Add awaits to newly async calls in TokenService

* [bug] Add several missing awaits

* [bug] Add state service handlers for AutoConfirmFingerprint

* [bug] Move TwoFactorToken to global state

* Update unauth-guard.service.ts

Add back return true

* [refactor] Slim down the boilerplate needed to manage options on StateService calls

* [bug] Allow the lock message handler to manipulate a specific acount

* [bug] Add missing await to auth guard

* [bug] Adjust state scope of several biometric data points

* [bug] Ensure vault locking logic can operate over non-active accounts

* [style] Fix lint complaints

* [bug] Move disableFavicon to global state

* [refactor] Remove an unecassary parameter from a StorageOptions instance

* [bug] Ensure HtmlStorageService paths are accounted for in StateService

* [feature] Add a server url helper to the account model for the account switcher

* [refactor] Remove some unused getters from the account model

* [bug] Ensure locking and logging out can function over any user

* Fix account getting set to null in getAccountFromDisk

* [bug] Ensure lock component is always working with the latest active account in state

* [chore] Update recent KeyConnector changes to use stateService

* [style] Fix lint complaints

* [chore] Resolve TokenService merge issues from KeyConnector

* [bug] Add missing service arguement

* [bug] Correct several default storage option types

* [bug] Check for the right key in hasEncKey

* [bug] Add enableFullWidth to the account model

* [style] Fix lint complaints

* [review] Revist remember email

* [refactor] Remove RememberEmail from state

* setDisableFavicon to correct storage location

* [bug] Convert vault lock loop returns into continues to not skip secondary accounts

* [review] Sorted state service methods

* [bug] Correct neverDomains type on the account model

* [review] Rename stateService.purge to stateService.clean

* [review] [refactor] Extract lock refresh logic to a load function

* [review] [refactor] Extract some timeout logic to dedicated functions

* [review] [refactor] Move AuthenticationStatus to a dedicated file

* [review] [refactor] Rename Globals to GlobalState

* [style] Fix lint complaints

* [review] Remove unused global state property for decodedToken

* [review] [bug] Adjust state scope for OrganizationInvitation

* [review] [bug] Put back the homepage variable in lock guard

* [review] Un-try-catch the window creation function

* Revert "[review] [bug] Adjust state scope for OrganizationInvitation"

This reverts commit caa4574a65d9d0c3573a7529ed2221764fd55497.

* [bug] Change || to && in recent vault timeout refactor

* [bug] Keep up with entire state in storage instead of just accounts and globals

Not having access to the last active user was creating issues across clients when restarting the process.
For example: when refreshing the page on web we no longer maintain an understanding of who is logged in.

To resolve this I converted all storage save operations to get and save an entire state object, instead of specifying accounts and globals.
This allows for more flexible saving, like saving activeUserId as a top level storage item.

* [style] Fix lint complaints

* Revert "[bug] Keep up with entire state in storage instead of just accounts and globals"

This reverts commit e8970725be472386358c1e2f06f53663c4979e0e.

* [bug] Initialize GlobalState by default

* [bug] Only get key hash from storage

* [bug] Remove settings storage location overrides

* [bug] Only save accessToken to storage

* [refactor] Remove unecassary argements from electron crypto state calls

* [bug] Ensure keys and tokens load and save to the right locations for web

* [style] Fix lint complaints

* [bug] Remove keySuffix storage option and split uses into unique methods

The keySuffix options don't work with saving serialized json as a storage object - use cases simply overwrite each other in state.
This commit breaks Auto and Biometric keys into distinct storage items and adjusts logic accordingly.

* [bug] Add default vault timeouts to new accounts

* [bug] Save appId as a top level storage item

* [bug] Add missing await to timeout logic

* [bug] Adjust state scope for everBeenUnlocked

* [bug] Clear access tokens when loading account state from disk

* [bug] Adjust theme to be a global state item

* [bug] Adjust null checking for window in state

* [bug] Correct getGlobals not pulling from the stored state item

* [bug] Null check in memory account before claiming it has a userId

* [bug] Scaffold secure storage service when building storage objects on init

* [bug] Adjusted state scope of event collection

* [bug] Adjusted state scope of vault timeout and action

* [bug] Grab account from normal storage if secure storage is requested but does not exist

* [bug] Create a State if one is requested from memory before it exists

* [bug] Ensure all storage locations are cleared on state clean

* [style] Fix lint complaints

* [bug] Remove uneeded clearing of access token

* [bug] Reset tokens when toggling

* [refactor] Split up the Account model

Until this point the account model has been very flat, holding many kinds of data.

In order to be able to prune data at appropriate times, for example clearing keys at logout without clearing QoL settings like locale,
the Account model has been divided into logical chunks.

* [bug] Correct the serverUrl helpers return

* Fix sends always coming back as empty in browser

* Get settings properly (I think)

* [bug] Fix lint error

* [bug] Add missing await to identity token refresh

This was causing weird behavior in web that was creating a lot of 429s

* [bug] Scaffold memory storage for web

Not properly creating storage objects on signin was creating weird behavior when logging out, locking, and logging back in.
Namely, encrypted data that was recently synced had nowhere to save to and was lost.

* [bug] Implement better null handling in a few places for retrieving state

* [bug] Update correct storage locations on account removal

* [bug] Added missing awaits to lock component

* [bug] Reload lock component on account switching vs. account update

* [bug] Store master keys correctly

* [bug] Move some biometrics storage items to global state

* [feature] Add platform helper isMac()

* [refactor] Comment emphasis and call order refresh

* [refactor] Remove unecassary using

* [bug] Relocate authenticationStatus check logic to component

* [bug] Stop not clearing everything on state clean

* [style] Fix lint complaints

* [bug] Correct mismatched uses of encrypted and decrypted pin states

* Add browser specific state classes and methods

* lint fixes

* [bug] Migrate existing persistant data to new schema

* [style] Fix lint complaints

* [bug] Dont clear settings on state clean

* [bug] Maintain the right storage items on logout

* [chore] resolve issues from merge

* [bug] Resolve settings clearing on lock

* [chore] Added a comment

* [review] fromatting for code review

* Revert browser state items

Co-authored-by: Robyn MacCallum <nickersthecat@gmail.com>
Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
2021-12-13 11:15:16 -05:00
Daniel James Smith
0199b638d1 Pull jslib 2021-12-13 11:50:08 +01:00
Daniel James Smith
8fc3cf50d2 Bump node to 16 and npm (#575)
* Bump engines required to node 16 and npm 8

* Bump @types/node to 16
The dep on node 14.18 will get cleaned up once we bump electron

* Modify build.yml to build with node 16 and npm 8

* Update requirements in README.md

* Remove install step for npm 8
npm v8.1.2 is included in node v16

* Rename install step

* Fixed typo
2021-12-13 11:43:10 +01:00
Daniel James Smith
fd14ccc86b Removed action step that installs npm8
npm 8 is included in node v16
2021-12-13 10:57:35 +01:00
Daniel James Smith
85491ebd18 Update requirements in README.md 2021-12-10 16:11:59 +01:00
Daniel James Smith
d35d7c821e Modify build.yml to build with node 16 and npm 8 2021-12-10 16:11:44 +01:00
Daniel James Smith
8c0b7b88f0 Bump @types/node to 16 2021-12-10 16:11:28 +01:00
Daniel James Smith
a545150faa Bump engines required to node 16 and npm 8 2021-12-10 16:07:04 +01:00
github-actions[bot]
74c9c1972f Bumped version to 1.30.1 (#1191)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-10 10:05:34 -05:00
Daniel James Smith
43426355ec Pull in jslib 2021-12-10 16:04:22 +01:00
Daniel James Smith
e9630eeae5 Sync package-lock.json after Angular bump (#573)
* Sync package-lock.json after Angular bump

* Add form-data as dev dependency and bump typescript

* Install rxjs as dev-dep in root package.json
2021-12-10 12:50:24 +01:00
Thomas Rittson
d7a72b66ff Revert hack to fix appearance in FF sidebar (#2218)
Bug fixed upstream in FF 90
2021-12-10 18:10:39 +10:00
Thomas Rittson
56e2c86a7f Fix name for compatibility with config.js (#1334) 2021-12-10 18:10:20 +10:00
github-actions[bot]
8fba2a693e Autosync the updated translations (#1333)
Co-authored-by: github-actions <>
2021-12-10 01:18:21 +01:00
Oscar Hinton
f582d3e7a6 Bump angular to v12 (#1325) 2021-12-09 22:12:53 +01:00
Oscar Hinton
559be594d6 Bump Angular to v12 (#2215) 2021-12-09 21:08:34 +01:00
Oscar Hinton
a10259ecab Bump angular to v12 (#1186) 2021-12-09 20:29:24 +01:00
Oscar Hinton
6a179ab2df Bump angular to 12. (#571) 2021-12-09 15:00:26 +01:00
github-actions[bot]
3e4aa8e476 Bumped version to 1.20.0 (#421)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-08 09:48:33 -05:00
github-actions[bot]
e835a53b80 Bumped version to 1.55.0 (#2214)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-08 09:03:39 -05:00
github-actions[bot]
9feb147654 Bumped version to 1.30.0 (#1187)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-08 09:02:21 -05:00
Vince Grassia
822c791cf9 Fix typo (#1185) 2021-12-08 08:48:37 -05:00
Vince Grassia
75984a2e37 Remove old 'release' ref in workflow (#1328) 2021-12-07 22:49:27 -05:00
github-actions[bot]
1cba6dc3b9 Bumped version to 2.25.0 (#1327)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-07 19:46:24 -07:00
Oscar Hinton
a803d58c52 Fix components trying to use anglar bradcastservice vs interface (#1326) 2021-12-07 23:16:47 +01:00
Oscar Hinton
b70d2fb3c3 Fix development build not working with bitwarden:// protocol (#1165) 2021-12-07 21:04:52 +01:00
Oscar Hinton
5fd1da0c58 Replace toaster library (#1183) 2021-12-07 20:42:31 +01:00
Oscar Hinton
e4aaf81816 Replace toaster library (#2210) 2021-12-07 20:42:18 +01:00
Oscar Hinton
d5c0783619 Replace toaster library (#1322) 2021-12-07 20:41:45 +01:00
Oscar Hinton
a6b95b15e3 Add toastr component (#568) 2021-12-07 19:15:56 +01:00
github-actions[bot]
35a7d6434a Autosync the updated translations (#1318)
Co-authored-by: github-actions <>
2021-12-07 17:06:08 +01:00
github-actions[bot]
2822d748f1 Autosync the updated translations (#1174)
Co-authored-by: github-actions <>
2021-12-07 17:01:42 +01:00
Daniel James Smith
86b4340bfb Merge pull request #2200 from bitwarden/crowdin-auto-sync
Autosync Crowdin Translations
2021-12-06 21:23:04 +01:00
Oscar Hinton
17aa403461 Fix DI not working (#2211) 2021-12-06 19:56:07 +01:00
Oscar Hinton
3eb860f464 BEEEP: Refactor services DI (#2201) 2021-12-06 12:21:07 +01:00
Oscar Hinton
04cfdb246d BEEEP: Refactor services DI (#1175) 2021-12-06 12:03:02 +01:00
Oscar Hinton
616b2e139a Run npm lint in CI (#2197) 2021-12-03 20:35:34 +00:00
Oscar Hinton
d0e4abf297 Run npm lint in CI (#416) 2021-12-03 20:34:59 +00:00
Oscar Hinton
78942cabf2 BEEEP: Refactor services DI (#1313) 2021-12-03 02:32:58 +00:00
b8feca16ec Autosync the updated translations 2021-12-03 00:04:46 +00:00
Oscar Hinton
5db94cc9d0 BEEEP: Move DI logic to jslib (#565) 2021-12-02 18:40:34 +00:00
Matt Gibson
d9231ae3f3 Fix families sponsorship redeem page (#1321)
* Display sponsorship warning when sponsoring an org

Move actions to drop down menu

Fix revoke cancel success popup

* Only show warning when sponsorship exists
2021-12-01 19:48:05 -06:00
Micaiah Martin
bca7c14319 Create workflow to automatically bump version (#1320) 2021-12-01 12:45:06 -07:00
Micaiah Martin
7444b701e8 Added version bump workflow (#419) 2021-11-30 18:23:08 -07:00