diff --git a/apps/desktop/desktop_native/windows_plugin_authenticator/src/ipc2/mod.rs b/apps/desktop/desktop_native/windows_plugin_authenticator/src/ipc2/mod.rs index 1cdb7c4b3a4..d1e3860c520 100644 --- a/apps/desktop/desktop_native/windows_plugin_authenticator/src/ipc2/mod.rs +++ b/apps/desktop/desktop_native/windows_plugin_authenticator/src/ipc2/mod.rs @@ -103,6 +103,10 @@ pub struct NativeStatus { const NO_CALLBACK_INDICATOR: u32 = 0; impl WindowsProviderClient { + pub fn is_available() -> bool { + desktop_core::ipc::path("af").exists() + } + // FIXME: Remove unwraps! They panic and terminate the whole application. #[allow(clippy::unwrap_used)] pub fn connect() -> Self { diff --git a/apps/desktop/desktop_native/windows_plugin_authenticator/src/lib.rs b/apps/desktop/desktop_native/windows_plugin_authenticator/src/lib.rs index 4a46c45af48..977c95dbb71 100644 --- a/apps/desktop/desktop_native/windows_plugin_authenticator/src/lib.rs +++ b/apps/desktop/desktop_native/windows_plugin_authenticator/src/lib.rs @@ -226,6 +226,10 @@ impl PluginAuthenticator for BitwardenPluginAuthenticator { } fn lock_status(&self) -> Result> { + // If the IPC pipe is not open, then the client is not open and must be locked/logged out. + if !WindowsProviderClient::is_available() { + return Ok(PluginLockStatus::PluginLocked); + } get_lock_status(&self.get_client()) .map(|response| { if response.is_unlocked {