The helper method yields either 1) the configured web vault url or 2)
the configured server url. If neither are configured, null is returned,
which is already handled by defaulting to vault.bitwarden.com
Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>
* Update web sso content to indicate window OK to close
This is done after the authResult handoff message is delivered to the
extension. It is not possible to close the window from javascript as
closing a window is limited to the script that opened it.
If we maintain a reference to the web window, it should be possible to
subscribe to the authResult message and close the web windows from the
browser.
* Use i18n for close tab message
* delete cookie after it is used
Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>
* WIP: dirty fix to SSO web vs browser redirect logic split
* Use includes for clientId identification
routing determination more robust to future state string changes
Co-authored-by: Addison Beck <abeck@bitwarden.com>
Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>
Co-authored-by: Addison Beck <abeck@bitwarden.com>
The motivation for this is https://github.com/bitwarden/cli/issues/129
where failed sync's are swallowed by try-catch. By moving the try-catch
to the outside it is possible to reuse the already existing
allowThrowOnError argument which callers can use to signal whether
fullSync should throw or ignore errors silently. This patch is
companioned with a patch to the SyncCommand CLI command to pass
allowThrowOnError.
This is in conjunction with API changes that validates the last known
revision date provided here with the actual last revision date on the
server to block potential data loss due to client desyncs.
Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>