* [chore] Update jslib & state services to match
* [bug] Save userId when migrating state
This is used to check for authentication, so if not present on boot of the app authenticated users will still have to log in again
* [bug] Save added accounts with userId
Currently we are passing in an account object, resulting in a null key. We should be passing in a userId
* [bug] Ensure configs and settings are not cleared on logout
We need to persist directoryConfigruations on logout so that logging out and back in doesn't require folks to need to reconfig their settings
* Remove unneeded LoginSyncService
* Run prettier
* [style] Remove commented lines
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
* Only get users for includeGroup filter
* Additional refactor after feedback
* refactor building of user entries
* Update src/services/azure-directory.service.ts
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* Combine user null checks
* Rename variable
* Put deleted users loop back the way it was
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* Don't flag deleted users as duplicates
* Fix nearby linting error
* Apply user filter to deleted users as well
* Revert "Apply user filter to deleted users as well"
This reverts commit 1633ee265f.
* Only throw error if any duplicates are not deleted
* Rename processedUsers to processedActiveUsers
* Update src/services/sync.service.ts
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* Update src/services/sync.service.ts
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* Update src/services/sync.service.ts
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* Remove empty catch blocks and remove allow-empty-catch tslint rule
* Update jslib to #513
* Fix build errors after update of jslib
* Add missing params to LoginCommand ctor
* Fix build errors due to missing dependencies
* Add changes to package.json and package-lock.json
* Fixed formatting in tslint.json
* Ignore duplicate users with same externalId
* Add null check
* Exclude deleted users from disabled users (Azure)
* Fix order of null check
* Stringify and compare duplicate before discarding
* Allow main debugging in development builds
* Early fail on attempting to sync multiple users with the same email
* Truncate duplicate list if greater than 3
* Revert "Allow main debugging in development builds"
This reverts commit 3b804dd959.
* Avoid unnecessary API calls to Okta
Filter excluded/included groups as early as possible to avoid using up
API calls and long waits
* Remove console timing calls
* Use api key for login
* Remove user login and organization setting
* Override Api authentication to expect organization keys
* Linter fixes
* Use public API
The organization api key is valid only in the public api scope
* Use organization api key in CLI utility
* Serialize storageService writes
* Prefer multiple awaits to .then chains
* Initial PR review
* Do not treat api key inputs as passwords
This conforms with how they are handled in CLI/web
* Update jslib
* PR feedback
* Lock lowdb file when using. Do not allow caching
* Linter fixes
* Move to non-jslib lowdbstorage to allow for lockfile
* update jslib
* Must ensure db file exists prior to initialization
proper-lockfile throws if the file its locking does not exist
* update jslib
* Let base handle file initialization
* Groups that reference all users in an organisation were not being populated
They now are, based on the "customer" member type. The null check for member.status is now not required as the property was only null for groups and now that comparison will not occur.
* If the user is not configured to sync users, but is syncing groups this errored with "users is not iterable"
* Update gsuite-directory.service.ts
Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>