Updated to use `model.credentials` property.