title: Having trouble verifying email in firebase, applyActionCode keeps saying my code is invalid
body: <p>I have been trying to verify email with firebase but for some reason the emailVerified field never becomes true. I am successfully receiving the email link, when I open the link it redirects me back to the verify email page, and on the page I am parsing the url and capturing the oob code, and then passing into the applyActionCode function. When I do this it keeps telling me my code is invalid. Please help..</p>
  <p>Signup function where I am sending the email verification (this part works)</p>
  <pre><code> const handleSignup = async (email, password) =&gt; {
      try {
        setLoading(true);
        await signup(email, password).then(() =&gt; {
          sendVerificationEmail(email);
        });
        // history.push('/home');
      } catch (err) {
        // firebase error
        handleInputValidation(err);
        setLoading(false);
      }
    };
  </code></pre>
  <p>VerifyEmail.jsx (this is the page I am redirected to when I open the link)</p>
  <pre><code>const EmailVerification = () =&gt; {
  
    const {
      currentUser,
      isCorrectEmailLink,
      signInWithEmail,
      sendVerificationEmail,
  
      verifyWithCode,
      updateUserForVerification,
    } = useAuth();
    const currentUserEmail = currentUser.email;
  
    const query = window?.location?.href?.split('oobCode=')[1];
    const oob = query?.split('&amp;mode')[0];
    console.log(oob, 'here');
  
    const verifyEmail = async (emailLink, email) =&gt; {
      const isCorrect = isCorrectEmailLink(emailLink);
  
      if (oob !== undefined) {
        verifyWithCode(oob);
      }
      await updateUserForVerification();
    };
  
    useEffect(() =&gt; {
      if (!currentUser.isVerified) {
        verifyEmail(window.location.href);
      }
    }, []);
  
    return (
      &lt;GridContainer&gt;
        &lt;LoginContainer&gt;
          &lt;WelcomeToDavie /&gt;
          &lt;AppletContainer&gt;
            &lt;WelcomeText&gt;Verify Your email adress&lt;/WelcomeText&gt;
            &lt;Applet&gt;
              &lt;FormName&gt;Verify&lt;/FormName&gt;
              &lt;LoginTextFieldContainer&gt;
                Verification code sent
                &lt;button onClick={() =&gt; sendVerificationEmail(currentUserEmail)} type=&quot;button&quot;&gt;
                  send email
                &lt;/button&gt;
              &lt;/LoginTextFieldContainer&gt;
            &lt;/Applet&gt;
          &lt;/AppletContainer&gt;
        &lt;/LoginContainer&gt;
      &lt;/GridContainer&gt;
    );
  };
  
  export default EmailVerification;
  
  </code></pre>
  <p>Here is the error I get when sending the oob code taken from the email link url<a href="https://i.stack.imgur.com/LFmUo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LFmUo.png" alt="enter image description here" /></a></p>
  <p>Please help me figure this out, been on this issue for a couple weeks now.</p>