title: Firebase: sendSignInLinkToEmail() throws: "The given sign-in provider is disabled for this Firebase project."
body: <p>Trying to: </p>
  
  <pre><code>import firebase from 'firebase/app';
  import 'firebase/auth';
  import 'firebase/firestore';
  
  firebase.initializeApp(...);
  
  const auth = firebase.auth();
  
  // I inspected `auth` here to verify that I'm authenticating 
  // with the right project where the Email/Password sign-in provider
  // is enabled.
  
  auth.createUserWithEmailAndPassword(email, password).then(() =&gt; {
    // All fine until here, new user is created.
    auth.sendSignInLinkToEmail(email, {
      url: window.location.href,
      handleCodeInApp: true,
    }).catch(error =&gt; {
      // Here, the error below is thrown.
    });
  });
  </code></pre>
  
  <p>throws:</p>
  
  <blockquote>
    <p>[auth/operation-not-allowed] The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.</p>
  </blockquote>
  
  <p>Interestingly, this works as expected:</p>
  
  <pre><code>auth.onAuthStateChanged(user =&gt; {
    // some logic here, and then:
    user
      .sendEmailVerification()
      .then(() =&gt; {
        // email is sent fine
      })
  });
  </code></pre>
  
  <p><a href="https://codesandbox.io/s/p29pjl556x" rel="nofollow noreferrer">Here</a> is a minimal reproducible example that demonstrates the issue. Make sure to change the email address to one that hasn't been used before to see the error above.</p>
  
  <p>What could be the reason for this error?</p>
  
  <p>I'm using firebase@5.8.3</p>