Having to use a mobile phone to receive OTPs is a nuisance and not many sites adopted TOTP or WebauthN yet.
- Launch server.
- Install Android client app, give it the permission to receive and read SMS, specify server connection details. The client application will listen to all incoming SMS messages, extract OTP codes and send them to the server.
- Get the last received OTP code on your PC, e.g.
curl "$SERVER_URL/otp" -H "Accept: text/plain"
- The client app supports Basic authorization, but the server does not (use a reverse proxy).
- To type the received OTP code automatically, use
xdotool
(orydotool
on Wayland):curl ... | xdotool type --file -