Except how is that reconciled with the idea of a secret ballot?
Actually I don't know for sure, but one way might be to seal the provisional ballot in an envelope with the voter's name and information on it. If the registration checks out, the ballot can be unsealed and scanned; if it doesn't, it can be held for however long the law requires, then destroyed, still sealed. I'm sure there are ways it can be done to protect the voter's privacy.