Rewrite credentials API to work with save on deploy.