Print connection password typed by user on NodeMCU Lua ESP8266 ESP-12E
You can't.

The password does not exist.

In short:


The password is used to create a key
The key is used to encrypt the connection
If both ends agree on the encryption then it's "connected" and packets can travel back and forth.


There is no password for you to print, only the fact that encryption didn't agree.

It actuality it's more complex than that, but that's the rough outline of how it works.