mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-17 20:19:55 +00:00
logoutFromProfile failed hard when the management server returned NotFound (peer already deleted from the dashboard), blocking both profile logout and profile removal. Treat NotFound as success — the peer is already gone, so deregistering it is already satisfied. Also drop the user-side per-profile state file on logout. The account email is sourced from <profile>.state.json (written by the CLI after SSO login), which the root daemon can't reach, so logout left a stale email showing in the UI. Connection.Logout now removes it from the UI process after a successful logout; the next SSO login recreates it.