The website sends the verification function to the user device. The user device then returns a proof that it knows an input that the verification function accepts.
The verification function should include a digital signature check.
This is generally possible already with SSI based credentials, including standards created by W3C.