Image credit: AppleInsider
A patent recently awarded to Apple shows a method for recovering lost passwords. It works by using a special peripheral. For instance, a power cord.
When you connect your MacBook to your power cord, or whatever this hypothetical peripheral may be (hard drive, flash drive, smart phone, etc), it communicates with Apple servers to recover your password. The peripheral would have a unique identifier of some kind to let the server know that you are the owner of the device.
Of course this is only a patent filing, and the only drawback is that someone who knows that you can recover passwords with a peripheral may be able to use it to their benefit. Then again, it all depends on how it’s implemented.