Autodeploy failed - error validating Auth Provider

Hello,

Hopefully this is a pretty basic question, but couldn’t find any solutions online.

I have a user authenticated in my Stitch app but when I try to deploy my updated code I get this error:

Failed: failed to import app: error validating Auth Provider: cannot remove Auth Provider ‘oauth2-google’; please first delete all Users associated with this provider using the web interface

In order to successfully deploy I need to manually delete the users in my Stitch console and the redeploy. I must be able to deploy code to Stitch hosting whilst having authenticated users, how can I solve this issue?

Daniel

Hi Daniel – Apologies for the lag in getting to this question. To clarify a few points here –

  • Seems like you are deploying with the CLI, is that the case?
  • The error implies that you are removing your Google Auth provider within the deploy – Is this intentional?

If you are trying to remove the Google Auth provider with the deploy then you will need to remove the associated users. As you note, this can be done in the UI, but it can also be accomplished via our Admin API. If you are not attempting to remove your Google Auth configuration this is likely an indicator that it is not present in the application configuration that you are attempting to deploy.

Hi Drew,

Thanks very much for getting back to me. No I’m using auto deploy through GIT. I have actually figured out the problem, it is as you say an config error in my local repo, caused by using the wrong file structure in my case. It wasn’t intentional, but is now working correctly.

Best regards,

Daniel