Melt butter in a saucepan over medium heat. Cook and stir onion until soft, about 5 minutes. Stir flour and salt into onion until flour forms a paste, 1-2 minutes. Gradually whisk milk and mustard into onion mixture and bring to a simmer, whisking constantly until the sauce thickens, 5-7 minutes.
Stir in cheddar cheese and white beans into sauce until cheese melts into sauce, 5-7 minutes. Serve over buttered toast.