title: POST 400 error on signup - Vue JS / Firebase
body: <p>I'm trying to do a signup on my app but I'm getting error like:</p>
  <p>&quot;POST <a href="https://identitytoolkit.googleapis.com/v1/accounts:signUp?key=AIzaSyCO3QWLiPMJyrZqZLi66vsRsvVVgcGvyQg" rel="nofollow noreferrer">https://identitytoolkit.googleapis.com/v1/accounts:signUp?key=AIzaSyCO3QWLiPMJyrZqZLi66vsRsvVVgcGvyQg</a> 400&quot;</p>
  <p>I'm using Vue JS and Firebase 9. My code in Signup.vue is:</p>
  <pre><code>import { initializeApp, db } from &quot;@/firebase.js&quot;;
  import { getAuth, createUserWithEmailAndPassword } from &quot;firebase/auth&quot;;
  import { doc, setDoc } from &quot;firebase/firestore&quot;;
  
  
  const auth = getAuth();
  
  export default {
    name: &quot;signup&quot;,
    data() {
      return {
        firstName: &quot;&quot;,
        lastName: &quot;&quot;,
        username: &quot;&quot;,
        password: &quot;&quot;,
        country: &quot;&quot;,
        city: &quot;&quot;,
        zipCode: &quot;&quot;,
      };
    },
    methods: {
      
      signupClick() {
        createUserWithEmailAndPassword(auth, this.username, this.password)
          .then((userCredential) =&gt; {
            // Signed in
            const userProfileData = {
              username: this.username,
              firstName: this.firstName,
              lastName: this.lastName,
              country: this.country,
              city: this.city,
              zipcode: this.zipCode,
            };
  
            this.$router.push({ name: &quot;dashboard&quot; });
            console.log(&quot;Uspjesna reg&quot;);
            const user = userCredential.user;
  
            
            const userProfile = setDoc(doc(db, &quot;users&quot;, userCredential.user.uid), userProfileData);
          })
          .catch((error) =&gt; {
            const errorCode = error.code;
            const errorMessage = error.message;
            
          });
      },
    },
  }; 
  
  </code></pre>