Add scratch code generation.
Save generated credentials for the specified user using the configured ICredentialRepository.