You should add backup codes like in Googles 2factor authentication. Backup Codes are fixed one-time codes (if I remember they're longer, than the generated codes), so called scratch-codes (use one, scratch it). The user should be able to regenerate them (not without using password of course) for security reasons (lost codes?). Usually you print them out and put them into your wallet for example.