Authentification via telegram or password to use specified widget

Hi.
I’ve one project for opening specific gates at building and I need to secure some gates for opening via password.
This project is used by a lot of people.
Please advice, if it’s possible to make a widget with password?
Or to open the gate, I will need to press some code combinations of buttons at display - and ofcourse, it shouldn’t be seen by any users which will be online at teh project during entering the code.

The most great way, it is to make autentification via chat bot at telegram. Please advice, if it’s possible.
Thanks