this is a little bug but one people should be aware of. Steps to repeat (might be inconsistent):
- iPhone is locked and sleeping.
- Attempt to connect using iPhone Mirroring on Mac.
- Mac says phone needs passcode to allow iPhone Mirroring.
- If you wake the iPhone, it will momentarily display the last screen contents before the device locked/slept, and then flash up a passcode screen.
- If you mistype the passcode, the screen contents will again flash-up -- all without any authentication.