The way it works in my country is: you install an app that uses your passports NFC chip to verify your identity. Then gov web services or verified third parties (like private insurance) can use what looks like (I did not dig in the details) a fairly standard OAuth flow.